What is the recommended value for ES_HEAP_SIZE?


We are planning to run Elasticsearch 1.7 with Java 7 version and we have 3 Physical Servers.

Our proposed setup is as follows:-
a. 3 Master Nodes (1 in each server)
b 3 Client Nodes (1 in each server)
c. 3 Data Nodes (1 in each server)

So, in total, we are planning to have 9 Nodes running from 3 Physical Servers and our servers have 128 GB RAM
We understand 50 % of RAM size (64 GB) is used by OS and
1. We would like to know the recommended value for ES_HEAP_SIZE for Master node, Client node & Data node respectively?


We recommend that no single instance of Elasticsearch have more than a 30G heap allocated. The reasons are complex, but simplified it comes down to:

  1. Shorter GC pauses

  2. 32-bit pointers (exceeding this amount leads to 64-bit pointers, which yields a performance regression, and consumes more memory)

  3. Oracle's java developers tested this number and gave us this recommendation. I figure that's a pretty good reason.

This means that with 128G boxes, you could have 2 instances of Elasticsearch running side-by-side on each box.

You could reasonably slice up memory like so:

a. Master node 16GB or less
b. Client node 16GB or less
c. Data node 30.5GB, do not go higher.

You'll probably need to do some experimenting with your master/client to see what works for your cluster. Also, try to mlockall: true

1 Like

Thanks for your response. We will let know the feedback.