JVM heap sizes

edit

ECE uses default JVM heap sizes for services that work for testing. For production systems, we recommend that you install ECE according to the JVM heap size recommendations in this section. Our recommendations are based on our longstanding experience with the Elastic Cloud hosted offering and our growing experience with ECE in customer settings. Other JVM heap sizes can be left at their defaults.

For any topology, we recommend:

Service JVM Heap Size (Xms and Xmx)

runner

1 GB

allocator

4 GB

proxy

8 GB

zookeeper

4 GB

director

1 GB

constructor

4 GB

admin-console

4 GB

You specify the recommended JVM heap sizes with --memory-settings JVM_SETTINGS parameter when you install ECE. For examples, see the deployment scenarios in our Playbook for Production.

Elasticsearch clusters and JVM heap size

edit

For Elasticsearch clusters, ECE gives 50% of the available memory to the JVM heap used by Elasticsearch, while leaving the other 50% for the operating system. This memory won’t go unused, as Lucene is designed to leverage the underlying OS for caching in-memory data structures, meaning that Lucene will happily gobble up whatever is left over. The ideal heap size is somewhere below 32 GB, as heap sizes above 32 GB become less efficient.

What these recommendations mean is that on a 64 GB cluster, we dedicate 32 GB to the Elasticsearch heap and 32 GB to the operating system in the container that hosts your cluster. If you provision a 128 GB cluster, we create two 64 GB nodes, each node with 32 GB reserved for the Elasticsearch heap and 32 GB reserved for the operating system.

For more information about why heap sizes, memory for the operating system, and the 32 GB maximum for JVMs matter, see Heap: Sizing and Swapping.