# ElastiSearch consuming above 90% RAM memory continuously

**URL:** <https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812>\
**Category:** Elasticsearch\
**Created:** [October 26, 2023, 12:34pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812 "2023-10-26T12:34:43Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Rajesh123](https://avatars.discourse-cdn.com/v4/letter/r/c37758/32.png) [@Rajesh123](https://discuss.elastic.co/u/Rajesh123)\
**Post date:** [October 26, 2023, 12:34pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812/1 "2023-10-26T12:34:43Z")

</div>

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

---

<div class="post-metadata">

**Author:** ![Rios](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/rios/32/95745_2.png) [@Rios](https://discuss.elastic.co/u/Rios)\
**Post date:** [October 26, 2023, 12:54pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812/2 "2023-10-26T12:54:03Z")

</div>

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

```auto
-Xms16g
-Xmx16g

```

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [October 26, 2023, 1:04pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812/3 "2023-10-26T13:04:27Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![johngregg](https://avatars.discourse-cdn.com/v4/letter/j/e19b73/32.png) [@johngregg](https://discuss.elastic.co/u/johngregg)\
**Post date:** [November 2, 2023, 6:31pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812/4 "2023-11-02T18:31:11Z")

</div>

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.

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 30, 2023, 6:32pm UTC](https://discuss.elastic.co/t/elastisearch-consuming-above-90-ram-memory-continuously/345812/5 "2023-11-30T18:32:09Z")

</div>

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