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.
-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.
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.