ES_JAVA_OPTS exceding memory usage

Hi,

I'm running an ES cluster with 3 nodes using docker compose, my 3 nodes have the same below environment JAVA OPTS configuration. My understanding setting such value it would limit the memory usage, my node1 and 2 are rounding the 20 gb, it's ok, but my concern is why my node3 is exceding to 25 gb of usage.

environment:
  - bootstrap.memory_lock=true
  - "ES_JAVA_OPTS=-Xms20g -Xmx20g"

Example,

node3:
2020-01-28 11_05_20-root@sacvl1191__el1_app_elkstack_docker

node1 and 2:
node1

Any help is very appreciable .

Regards,
Jorge

-Xmx sets the maximum heap size, but there's other things that use memory apart from the heap. From the docs (emphasis mine):

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.

1 Like

Thanks David this information helped me a lot.

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