Garbage Collection Not Working

Hi,

in the output that you've shared privately with me we can see:

        "gc_collectors" : [
          "PS Scavenge",
          "PS MarkSweep"
        ]

This means that the CMS garbage collector is in use. This is because you're running on JDK 8 and it is the default garbage collector there. The provided JVM options are (I've omitted any system properties):

        "input_arguments" : [
          "-Xms29500m",
          "-Xmx29500m"
        ]

This is very minimal (even the GC is unspecified) so it appears to me you have a very non-standard jvm.options file. I suggest you compare your jvm.options file with Elasticsearch's default jvm.options file for version 6.6 and add any missing lines. Note that that file is only a template, so you need to ensure to replace any placeholders (e.g. ${heap.dump.path}) with proper paths on your system (see the comments in the file for guidance).

After you've done this, you should have:

  • Correct system properties set (you're missing several of them, e.g. -Dio.netty.noUnsafe=true)
  • JVM options are set so you will have garbage collection logs and also the garbage collector is explicitly configured instead of implicitly chosen by the JVM (this could bite you when upgrading the JVM).

If in doubt you can always share any files or output privately.

Daniel

1 Like