# Elasticsearch Consuming Massive Memory

**URL:** <https://discuss.elastic.co/t/elasticsearch-consuming-massive-memory/226783>\
**Category:** Elasticsearch\
**Created:** [April 6, 2020, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-consuming-massive-memory/226783 "2020-04-06T21:48:15Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![wwalker](https://avatars.discourse-cdn.com/v4/letter/w/43a26b/32.png) [@wwalker](https://discuss.elastic.co/u/wwalker)\
**Post date:** [April 6, 2020, 9:48pm UTC](https://discuss.elastic.co/t/elasticsearch-consuming-massive-memory/226783/1 "2020-04-06T21:48:15Z")

</div>

Just curious as to what's going on here. jvm.options set to 20GB but this is what I see in Task Manager. Running Elasticsearch 7.6 on Server 2012 R2

 ![image](https://us1.discourse-cdn.com/elastic/original/3X/c/e/cea8de51d79e08d8b2652887a6fc8f72252235de.png)

---

<div class="post-metadata">

**Author:** ![Luca\_Belluccini](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/luca_belluccini/32/33239_2.png) [@Luca\_Belluccini](https://discuss.elastic.co/u/Luca_Belluccini)\
**Post date:** [April 6, 2020, 10:58pm UTC](https://discuss.elastic.co/t/elasticsearch-consuming-massive-memory/226783/2 "2020-04-06T22:58:33Z")

</div>

The 20GB is the amount of memory you've configured to allocate for the JVM Heap.  
A Java process / service doesn't use only the amount of memory defined for the JVM Heap but it will make use native (off-heap) memory. Think about the memory required in order to run the JVM itself.

For example, if you've defined a JVM Max Heap size of 20GB, in recent versions of Elasticsearch is going to limit the `XX:MaxDirectMemorySize` to 50% of the JVM Max Heap size (10GB) for direct memory.

Please rely on [our documentation](https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html#heap-size) to configure Elasticsearch and set the JVM Max Heap size.

Also ensure you're running a [supported JDK](https://www.elastic.co/support/matrix#matrix_jvm).

---

<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:** [May 4, 2020, 11:09pm UTC](https://discuss.elastic.co/t/elasticsearch-consuming-massive-memory/226783/3 "2020-05-04T23:09:03Z")

</div>

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