Thanks for your reply!
After noticing this issue, I spent some time thinking about possible improvements — and I’ve realized it’s actually quite a challenging problem. Compared to Badger, Dgraph has dynamic posting list sizes, which makes estimation much harder.
I think your idea of adapting the cache size automatically based on total available memory is a promising direction. I’ll also keep thinking about this and see if I can come up with any further suggestions.
Appreciate your input — hope you have a great day!