Automatic heap sizing

I'm testing the automatic heap size feature in 7.16.2. In a 12G VM I was specifying a 4G heap, I removed that setting, restarted Elasticsearch and it used 1G for heap. That seams small to me.

Does it grow the heap if it needs to or is this set at startup?

Does this seem like an appropriate heap size?


I saw a similar post, but it went unanswered. JVM automatic heap sizing set too low (version 7.14.1)

I'm observing the same issue. We are running Elasticsearch in docker with the default JVM settings.
Any help would be appreciated!

Best regards

Bump so it won't close.

1 Like

Hi !

I am not a professionnal about Elastic Stack but from my experience 1G seems a bit small to me too.

Every time I set de maximum heap possible (50% of my RAM without exceeding 31GB) and personally I didn't use automatic / default configuration. However, it depend on your node needs, I think the role of the node is quite important to know how configure the size heap.

Do you ave any issues with 1G of heap ? What is the role of your node ?

I let you with the following link that may help you.

Set the JVM Heap Size

I make an assumption after reading that : Maybe a dedicated Master node need a smaller heap size than a data node.

I hope this can help you.


What JVM version are you using?

Doesn't Elastic ship the JVM now? How do I tell?

Does this mean anything?
/usr/share/Elasticsearch/jdk/bin/java --version
openjdk 17.0.1 2021-10-19
OpenJDK Runtime Environment Temurin-17.0.1+12 (build 17.0.1+12)
OpenJDK 64-Bit Server VM Temurin-17.0.1+12 (build 17.0.1+12, mixed mode, sharing)

That sounds right but I'd check that this is the JDK you're actually using (it should be in GET _nodes or GET _nodes/stats, I forget which).

GET_nodes shows JVM version 17.0.1 also.

Roles are

"roles" : [

Stayin alive....

Sorry Len I don't have any other ideas apart from the question about the JVM version. It could be a bug, and IMO it's also a bug that there seems to be no way to trace how the heap is being calculated. I suggest opening a Github issue on the subject.

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