# Elasticsearch 7.9, set or not manually JVM heap memory

**URL:** <https://discuss.elastic.co/t/elasticsearch-7-9-set-or-not-manually-jvm-heap-memory/272041>\
**Category:** Elasticsearch\
**Created:** [May 4, 2021, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-set-or-not-manually-jvm-heap-memory/272041 "2021-05-04T07:33:17Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![parallelism](https://avatars.discourse-cdn.com/v4/letter/p/8491ac/32.png) [@parallelism](https://discuss.elastic.co/u/parallelism)\
**Post date:** [May 4, 2021, 7:33am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-set-or-not-manually-jvm-heap-memory/272041/1 "2021-05-04T07:33:17Z")

</div>

Hello,

We are deploying an Elasticsearch 7.9.3 cluster in a production environment. About setting or not the Java heap memory assignment, we find in the documentation something that seems a little contradictory.

According to this, is "_important to configure heap size_" because "_by default, Elasticsearch tells the JVM to use a heap with a minimum and maximum size of 1 GB_".

> **[Setting the heap size | Elasticsearch Guide \[7.9\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.9/heap-size.html)**

However, this another entry explain that Elasticsearch "_automatically sets the JVM heap size based on a node’s roles and total memory_", recommending "_the default sizing for most production environments_".

> **[Important Elasticsearch configuration | Elasticsearch Guide \[7.x\] | Elastic](https://www.elastic.co/guide/en/elasticsearch/reference/7.x/important-settings.html#heap-size-settings)**

When deploying the cluster with not heap memory parameters, we see the Elasticsearch process with the options "MaxHeapSize" and "MinHeapSize" with a value of 1GB.  
Therefore, ¿we should explicitly configure the heap size parameters for a higher value?  
Otherwise, ¿the heap will have always the 1GB size?

Thanks in advance.

Reggards.

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [May 4, 2021, 8:22am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-set-or-not-manually-jvm-heap-memory/272041/2 "2021-05-04T08:22:51Z")

</div>

> [@parallelism](#):
>
> However, this another entry explain that Elasticsearch " _automatically sets the JVM heap size based on a node’s roles and total memory_ ", recommending " _the default sizing for most production environments_ ".

This has been introduced from 7.11.

---

<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:** [June 1, 2021, 8:23am UTC](https://discuss.elastic.co/t/elasticsearch-7-9-set-or-not-manually-jvm-heap-memory/272041/3 "2021-06-01T08:23:41Z")

</div>

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