Need help changing Elasticsearch Heap size


I have graylog installed on Debian Jessie. When I use the cerebro plug-in to view my Elasticsearch cluster, I see a maximum heap size of 1G. I want to up this to the recommended 50% of real memory. Here is what I have done:

  1. Created /etc/profile.d/ with

export ES_HEAP_SIZE=3g

  1. Modified /etc/elasticsearch/elasticsearch.yml with the following:


  1. Modified /etc/init.d/elasticsearch

ES_JAVA_OPTS="-Xms1g -Xmx3g"

Despite all these changes, my max heap size keeps showing up as 1 gig. When I do a ps -ef, I see:

/usr/bin/java -Xms256m -Xmx1g

I have no idea where those settings are coming from. Any help would be appreciated.


Hi Beth,

try /etc/default/elasticsearch. :wink:

You can find the commonly required file locations in the documentation at

Thank you so much! It’s all fixed.