ElastiSearch consuming above 90% RAM memory continuously

Hello,
Elastic Search continuously occupying above 90% .
Total RAM : 108 GB
JVM: 32 GB ( 28Gb used out of 32GB)
Single Node Elastic search.

Could you please suggest/help how to reduce the RAM usage.

Thanks in advance

By default, ES uses 50% of RAM
You can limit by adding in < configpath >\jvm.options.d\jvm.options:

-Xms16g
-Xmx16g

It is perfectly normal for Elsticsearch to make use of all memory on a server. First you have the heap, which has a set size. make sure this is a bit smaller than 32GB so you use compressed pointers. This should be shown in the logs on startup. Apart from this Elasticsearch also uses memory in addition to the heap. Part of this is due to off-heap storage, but the largest amount is usually used by the operating system page cache to cache files that are modfied or used. The memory used by the page cache helps Elasticsearch improve performance by reducing disk I/O, but it is worth noting that this memory at any time can be released by the operating system if there is another process that need it. Having Elasticsearch use 100% of the server memory should therefore not be a problem. The memory is there to be used.

3 Likes

What problem is this causing?

Heap usage itself isn't really a problem. Time spent garbage collecting can be a problem, however. I don't know what's normal GC for Elastic search, but think about the GC time as a percentage. For example, if it's 600ms per minute, that's 1%. Most people would consider that ok. If you could get it down to 0.5%, would that make a meaningful difference? Probably not.

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.