1

I'd like to figure out if I need to tune my currently-running ElasticSearch cluster. How do I check if a running HotSpot process is using compressed oops or not?

2 Answers 2

4

You can use the cluster nodes info API and check using_compressed_ordinary_object_pointers field in the jvm field.

Eg

curl -XGET 'http://localhost:9200/_nodes'

or

curl -XGET 'http://localhost:9200/_nodes/nodeId1'

Or more specific:

curl -XGET 'http://localhost:9200/_nodes/nodeId1,nodeId2/jvm?pretty'

Response

...
"jvm" : {
        "pid" : 14520,
        "version" : "1.8.0_121",
        "vm_name" : "OpenJDK 64-Bit Server VM",
        "vm_version" : "25.121-b13",
        "vm_vendor" : "Oracle Corporation",
        "start_time_in_millis" : 1485817021479,
        "mem" : {
          "heap_init_in_bytes" : 5368709120,
          "heap_max_in_bytes" : 5333843968,
          "non_heap_init_in_bytes" : 2555904,
          "non_heap_max_in_bytes" : 0,
          "direct_max_in_bytes" : 5333843968
        },
        "gc_collectors" : [ "ParNew", "ConcurrentMarkSweep" ],
        "memory_pools" : [ "Code Cache", "Metaspace", "Compressed Class Space", "Par Eden Space", "Par Survivor Space", "CMS Old Gen" ],
        "using_compressed_ordinary_object_pointers" : "true"
      },

...
2
1

If you check your ES logs, it will tell you. At least as of version 2.2.0.

It'll show a line something like this:

[2015-12-16 13:53:33,417][INFO ][env] [Illyana Rasputin] heap size [989.8mb], compressed ordinary object pointers [true]

This is outlined about halfway down this article, which incidentally has a LOT of good information about memory sizing your ES instances/nodes.

5
  • Unfortunately that log got rotated away a VERY long time ago. Feb 2, 2017 at 22:03
  • I'm fairly certain that it will report it's state every time the service starts, but I haven't checked in a while.
    – GregL
    Feb 2, 2017 at 22:05
  • Yep. Last time it started was 2015... Feb 2, 2017 at 22:07
  • Good grief man.. Maybe it's time for a restart...
    – GregL
    Feb 2, 2017 at 22:08
  • I don't disagree with you, but upgrading to >=2.2.0 would require a pretty large maintenance window :) Feb 2, 2017 at 23:10

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .