API showing incorrect data


#1

Trying to check the heap max in bytes using

http://localhost:9600/_node/jvm?pretty=true

works correctly which shows 8GB for me. Now when I try to see more detailed stats about the JVM with:

http://localhost:9600/_node/stats/jvm?pretty=true

It shows my heap max in bytes as 17GB which makes no sense since the server is on doesn't even have that much ram. The logstash process has this java args too: "-Xmx8g -Xms8g -Xss2048k"


(Mark Walkom) #2

Can you show us the actual output, as well as what version, OS and JVM.


#4

_node/jvm output:

{
  "host" : "elastic-logstash.drsite.local",
  "version" : "5.1.2",
  "http_address" : "127.0.0.1:9600",
  "id" : "acaeaae5-8b97-464d-9719-79f378874e82",
  "name" : "elastic-logstash.drsite.local",
  "jvm" : {
    "pid" : 26215,
    "version" : "1.8.0_111",
    "vm_name" : "OpenJDK 64-Bit Server VM",
    "vm_version" : "1.8.0_111",
    "vm_vendor" : "Oracle Corporation",
    "start_time_in_millis" : 1485542195317,
    "mem" : {
      "heap_init_in_bytes" : 8589934592,
      "heap_max_in_bytes" : 8555069440,
      "non_heap_init_in_bytes" : 2555904,
      "non_heap_max_in_bytes" : 0
    },
    "gc_collectors" : [ "ParNew", "ConcurrentMarkSweep" ]
  }

_node/stats/jvm output

{
  "host" : "elastic-logstash.drsite.local",
  "version" : "5.1.2",
  "http_address" : "127.0.0.1:9600",
  "id" : "acaeaae5-8b97-464d-9719-79f378874e82",
  "name" : "elastic-logstash.drsite.local",
  "jvm" : {
    "threads" : {
      "count" : 31,
      "peak_count" : 33
    },
    "mem" : {
      "heap_used_in_bytes" : 692095288,
      "heap_used_percent" : 4,
      "heap_committed_in_bytes" : 17110138880,
      "heap_max_in_bytes" : 17110138880,
      "non_heap_used_in_bytes" : 264043696,
      "non_heap_committed_in_bytes" : 283820032,
      "pools" : {
        "survivor" : {
          "peak_used_in_bytes" : 34865152,
          "used_in_bytes" : 36740656,
          "peak_max_in_bytes" : 34865152,
          "max_in_bytes" : 69730304,
          "committed_in_bytes" : 69730304
        },
        "old" : {
          "peak_used_in_bytes" : 173315864,
          "used_in_bytes" : 345991744,
          "peak_max_in_bytes" : 8241020928,
          "max_in_bytes" : 16482041856,
          "committed_in_bytes" : 16482041856
        },
        "young" : {
          "peak_used_in_bytes" : 279183360,
          "used_in_bytes" : 309362888,
          "peak_max_in_bytes" : 279183360,
          "max_in_bytes" : 558366720,
          "committed_in_bytes" : 558366720
        }
      }
    },
    "gc" : {
      "collectors" : {
        "old" : {
          "collection_time_in_millis" : 126,
          "collection_count" : 2
        },
        "young" : {
          "collection_time_in_millis" : 538222,
          "collection_count" : 16593
        }
      }
    },
    "uptime_in_millis" : 236891121
  }

These are the outputs compared

"heap_max_in_bytes" : 17110138880,
"heap_max_in_bytes" : 8555069440,

The OS is Fedora 25.


(Mark Walkom) #5

The _node/jvm (info API) shows the allocated heap size, the _node/stats/jvm (stats API) shows the max heap usage during the life of the process.

But it the info API shouldn't be reporting things incorrectly.
Can you raise an issue on Github with as much info as possible?


(Jordan Sissel) #6

Confirmed. Looks like one is double of the other:

⓿ localhost(~/projects/logstash) master !3!
% curl -s localhost:9600/_node/jvm | jq .jvm.mem.heap_max_in_bytes
1056309248
⓿ localhost(~/projects/logstash) master
% curl -s localhost:9600/_node/stats/jvm | jq .jvm.mem.heap_max_in_bytes
2112618496

(Jordan Sissel) #7

Filed https://github.com/elastic/logstash/issues/6608 to track.


#8

Indeed, it shows exactly double of the real value. I'm not sure either why there's "_node/jvm" instead of "_node/stats" which is how Elasticsearch handles it.


(system) #9

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