Filter cache eviction cause lots of old gc and long stop

Hi, my cluster has 6 nodes with 32G heap and 5G filter cache set to 5G. The filter cache expiration set to -1. as soon as the query request increase to 300req/sec, the eviction of filter cache will cause the old gc occur more often. this will stop the whole jvm for several seconds and make the whole cluster just like frozen.
my question is, the eviction of filter cache seems to be not avoidable, so, is there any way to make the cache eviction not to cause so many old gc and then stop the whole jvm?

They aren't related quite like that. Cache takes up heap, but it won't be cleaned in GC.

You should really reduce your heap to 30.5GB, beyond that and your pointers will no longer be compressed which leads to inefficiencies in the heap.

Thank you, But if the filter cache eviction is not the root cause of the old gc, so what is the root cause. I remembered someone said that after the object is evicted from cache, it will be freed by gc, is that right?

Thank you again.

Once something is evicted from cache then it's no longer in memory.

But if you have set expiration to -1 then it will never expire anything, I don't know how ES handles that in those cases.

I found this interesting blog:

and in this blog it said that "the eviction of filter cache will cause a lot of old gc".

hi @limac I also meet this problem.

Have you found the reason or solutions for this problem?
Any advice?

This is a very old thread. Please open up a new thread for your query.

I've post a new topic. Looking forward to you reply!

hi @rockybean
sorry for replying later, I found the cause of my situation is that I have set the max size of field cache to 40% of the heap size. That's too big and if the field cache becoming full, it will cause the heap full and old gc coming.
So, after I set the max to 20%, everything goes smoothly. hope this help.

2 Likes