Elasticsearch ram size

Hi Team,

I have installed Elasticsearch on windows 2016 server for the first time with hardware configuration of 16GB ram, 64 - bit OS, 8 core.

Now I want set the heap size of the elastic cluster.
What heap size should I have to assign for this and why?

Kindly help,
Tahseen

Elasticsearch now automatically sets the HEAP size for you. See Important Elasticsearch configuration | Elasticsearch Guide [7.15] | Elastic

Thank you for the quick response, but I have installed 7.7 version of Elasticsearch. And for the older version we need to set the heap size.
What elastic recommend for the windows 64-bit os with 16GM ram size.
Can you help me with this setting?

Regards,
Tahseen

I'd recommend to upgrade to 7.15.0.

For 7.7, you can look at Setting the heap size | Elasticsearch Guide [7.7] | Elastic but read carefully the last part of the page.

David,
what is setting to let Elasticsearch decide about jvm.
documentation didn't mention about that

It only said below. I am confuse. is this telling me not to touch jvm.options file and Elasticsearch will decide jvm heap by node role? am i correct on this assumption?

The documentation you took a screenshot from is for Elasticsearch 7.15, which I recommended to use earlier in this thread.

The link I shared for 7.7 (Setting the heap size | Elasticsearch Guide [7.7] | Elastic) says:

  • Set Xmx and Xms to no more than 50% of your physical RAM. Elasticsearch requires memory for purposes other than the JVM heap and it is important to leave space for this. For instance, Elasticsearch uses off-heap buffers for efficient network communication, relies on the operating system’s filesystem cache for efficient access to files, and the JVM itself requires some memory too. It is normal to observe the Elasticsearch process using more memory than the limit configured with the Xmx setting.
  • Set Xmx and Xms to no more than the threshold that the JVM uses for compressed object pointers (compressed oops); the exact threshold varies but is near 32 GB.

So use Half of the RAM available and no more than 30gb of HEAP.

yes I am using 7.15. just upgraded
so it is not automatic. you still have to edit jvm.options file and use 50% ? (default suggested by ELK)

So in 7.15, it's automatic.

Why do you say it's not?

David,
I might have not understanding what here automatic vs manual.
automatic for me is I don't have to change anything and Elasticsearch will choose jvm heap by taking 50% for actual memory

manual means I update jvm.options file, add jvm heap and start elasticearch.

Yes.

1 Like

Thank you for full explanation.

Thank you @dadoonet , for the advice I'll upgrade it to 7.15.

Regards,
Tahseen