Logstash jvm stats api heap used percent

Hi, I have question regarding the jvm info returned with the logstash node stats API (I'm on version 5.3.1).

API => "http://127.0.0.1:9600/_node/stats/jvm"

Here is what it returns:

heap_used_percent => 51 %
heap_used_in_bytes => 1.11 GB

My configuration is using logstash defaults with a max heap of 1GB, see below, so my question is why is heap used returning only 51% when it has already used up 1GB ?

Main PID: 29816 (java)
└─29816 /usr/bin/java -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 -XX:+UseCMSInitiatingOccupancyOnly -XX:+DisableExplicitGC -Djava.awt.headless=true -Dfile.encoding=UTF-8 -XX:+HeapDumpOnOutOfMemoryError -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 /usr/share/logstash/lib/bootstrap/environment.rb logstash/runner.rb --path.settings /etc/logstash

Also the heap_max_in_bytes returns different values based on the API call:

"nodeInfo API" => "http://127.0.0.1:9600/_node/jvm"

heap_max_in_bytes => 1.056 GB

nodeStats API => "http://127.0.0.1:9600/_node/stats/jvm"

heap_max_in_bytes => 2.113 GB

Could someone that has greater than version 5.3.1 try and see what they get for the above API calls. I take it this is a bug ?

Thanks,
E

I logged a bug on this issue here:

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