Configuring Heap Size in CentOS

I am new to ELK and I am trying to figure out this heap problem I am having. I am trying to search the site here, but I get multiple results on how to set heap and on what parts of ELK need the heap size adjusted.

I am pretty sure that Elasticsearch is where I need to adjust the heap setting.

I modified /etc/sysconfig/elasticsearch with ES_HEAP_SIZE=4g, but when I check that in Kibana, it's not showing 4gb as heap total.

I also restarted the service for Elasticsearch and it still only showing about 800mb heap total.

Any help would be appreciated. Thank you.

jvm.options file to update this.

What version are you on?

Also we’ve renamed ELK to the Elastic Stack, otherwise Beats and APM feel left out! :wink:

I am using Version 2.4. I will try to use Elastic Stack in the future :smile:

I am not seeing a jvm.options file. I found a java.conf file with these lines in it:

# Options to pass to the java interpreter

Is this what I need?

Is there a reason you are using such an older version? Current is 6.0.0.

The version we use is out of my control. I was handed this project because the guy who was working on it is no longer with us, so I am trying to study up on his stuff. I am not authorized to upgrade Elastic Stack until we get it 100% functional. Not my call on this.

OK, then check out

I checked that out and made a change to /etc/init.d/logstash , but the Kibana Status page is not displaying the amount I set it to. Do you have any other suggestions?

Please don't change the init file, it'll only cause problems later :slight_smile:

You should use /etc/default/elasticsearch -

There isn't elasticsearch at /etc/default/

Also, I am using CentOS 6.8

If you scroll down a bit it has instructions for RPM installs as well - :slight_smile:

Ah ok. I am still trying to figure out CentOS, so thanks for at least appearing to be understanding :smile:

I modified /etc/sysconfig/elasticsearch with


Then restarted elasticsearch, but Kibana is still showing significantly less Heap Total at the Status screen.

That's Kibana's resource use, not Elasticsearch.

Ah I was thinking that it was displaying the heap size of Elasticsearch. So I've probably had it right this whole time lol whoops >_>

Oh well, at least you know know a bit more about the stack :smiley:

1 Like

see the nodes....

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.