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 ?