LS_HEAP_SIZE broken with logstash 5.0.0?

Hi,

With logstash 5.0.0 on centos 7.2 using the elastic rpm, our logstash runs like this:
usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -Djava.io.tmpdir=$HOME -XX:HeapDumpPath=/dev/null -Xmx1g -Xms256m -Xss2048k -Djffi.boot.library.path=/usr/share/logstash/vendor/jruby/lib/jni -Xbootclasspath/a:/usr/share/logstash/vendor/jruby/lib/jruby.jar -classpath : -Djruby.home=/usr/share/logstash/vendor/jruby -Djruby.lib=/usr/share/logstash/vendor/jruby/lib -Djruby.script=jruby -Djruby.shell=/bin/sh org.jruby.Main --1.9 /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash
[root@zd020 logstash]#

I want to increase the heapsize to 4g, so I set LS_HEAP_SIZE=4g in /etc/sysconfig/logstash then ran $LS_HOME/bin/system-install followed by a restart of logstash. But -Xmx stayed at 1g, in other words the setting was not applied. I tried the same thing by adding LS_HEAP_SIZE to /etc/logstash/startup.options but the result was the same. I verified using visualVM that indeed the heapsize is still limited to 1g.
I did a grep for LS_HEAP_SIZE IN $LS_HOME/bin but the only script that seems to use that setting is a dos/windows batch script.

Perhaps the documentation is not correct in this area? How should I increase the heap that logstash 5 is allowed to use ?

Logstash 5.0 does not use /etc/sysconfig/logsgtash. It uses /etc/logstash/jvm.options, mirroring how Elasticsearch 5.0 handles jvm settings. This change is especially important as it allows the JVM locale to be set easily.

Try putting your heap settings in there.

indeed that does work (although not with ls_heap_size). It seems the documentation for logstash 5 is not correct since it still refers to ls_heap_size in many places.

thanks for the pointer.

Please share any links that point to /etc/sysconfig/logstash and/or LS_HEAP_SIZE (which is still usable, if launching exclusively from the command-line.

I think this is all of them: https://www.elastic.co/search?q="ls_heap_size"&section=Docs%2FLogstash%2FReference%2F5.0

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