Elasticsearch 7.9.3 upgrade - GC issues

Hello,
I have started the upgrade process to Elasticsearch-7.9.3 and I see that although I was using CMS GC before, and G1GC configurations are commented out, the instance starts and logs indicates that G1GC is used.

What is the reason for this? is CMS GC is now deprecated?

Thanks,
Lior

After some more checks, I noticed that although the jvm.options looks like this:

## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly

## G1GC Configuration
# NOTE: G1 GC is only supported on JDK version 10 or later
# to use G1GC, uncomment the next two lines and update the version on the
# following three lines to your version of the JDK
# 10-13:-XX:-UseConcMarkSweepGC
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
#14-:-XX:+UseG1GC
#14-:-XX:G1ReservePercent=25
#14-:-XX:InitiatingHeapOccupancyPercent=30

If I run this command to see default Java flags, I see that G1GC is enabled by default:

[root@aws-elkdb6 ~]# /usr/share/elasticsearch/jdk/bin/java -XX:+PrintCommandLineFlags -version
-XX:ConcGCThreads=2 -XX:G1ConcRefinementThreads=8 -XX:GCDrainStackTargetSize=64 -XX:InitialHeapSize=1042409472 -XX:MarkStackSize=4194304 -XX:MaxHeapSize=16678551552 -XX:MinHeapSize=6815736 -XX:+PrintCommandLineFlags -XX:ReservedCodeCacheSize=251658240 -XX:+SegmentedCodeCache -XX:+UseCompressedClassPointers -XX:+UseCompressedOops *-XX:+UseG1GC*
openjdk version "15" 2020-09-15
OpenJDK Runtime Environment (build 15+36-1562)
OpenJDK 64-Bit Server VM (build 15+36-1562, mixed mode, sharing)

What is the reason for this change? is now since ElasticSearch 7.9.2 has upgraded the JDK, and the new JDK is using G1GC as default, it means that I cannot configure to use CMS through the jvm.options file?

Thanks,
Lior

I believe the latest JVM that comes bundled with Elasticsearch has deprecated CMS, which means G1GC must be used.

Hey @Christian_Dahlqvist,

I see, after making some more checks and reading online I did suspected that.
Hopefully this change alongside with the cluster version won't affect cluster performance.
Although our nodes with max heap (31GB), we used to run with CMS for a very long time, so we'll see how it goes.

Thanks,
Lior

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