Need help changing Elasticsearch Heap size


(Beth) #1

Hi,

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/elasticsearch.sh with

export ES_HEAP_SIZE=3g

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

ES_HEAP_SIZE: 3g

  1. Modified /etc/init.d/elasticsearch

ES_HEAP_SIZE=3g
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.

Beth


(Jochen) #2

Hi Beth,

try /etc/default/elasticsearch. :wink:

You can find the commonly required file locations in the documentation at http://docs.graylog.org/en/2.2/pages/configuration/file_location.html#elasticsearch.


(Beth) #3

Thank you so much! It’s all fixed.

Beth