Configuring Heap Size in CentOS


#1

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.


(andy_zhou) #2

jvm.options file to update this.


(Mark Walkom) #3

What version are you on?

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


#4

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


#5

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
JAVACMD_OPTS=

Is this what I need?


(Mark Walkom) #6

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


#7

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.


(Mark Walkom) #8

OK, then check out https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-configuration.html


#9

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?


(Mark Walkom) #10

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

You should use /etc/default/elasticsearch - https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-service.html#_debian_ubuntu


#11

There isn't elasticsearch at /etc/default/

Also, I am using CentOS 6.8


(Mark Walkom) #12

If you scroll down a bit it has instructions for RPM installs as well - https://www.elastic.co/guide/en/elasticsearch/reference/2.4/setup-service.html#_rpm_based_distributions :slight_smile:


#13

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

ES_HEAP_SIZE=4g

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


(Mark Walkom) #14

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


#15

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 >_>


(Mark Walkom) #16

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


(andy_zhou) #17

see the nodes....


(system) #18

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