VM Warnings UseConcMarkSweepGC

  • Elasticsearch 7.7 on Windows Server
  • JAVA_HOME=path\to\elasticsearch\jdk
    • openjdk version "14" 2020-03-17
    • OpenJDK Runtime Environment AdoptOpenJDK (build 14+36)
    • OpenJDK 64-Bit Server VM AdoptOpenJDK (build 14+36, mixed mode, sharing)

elasticsearch.yml

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

As discussed here we were seeing warnings on stderr about:

OpenJDK 64-Bit Server VM warning: Option UseConcMarkSweepGC was deprecated in version 9.0 and will likely be removed in a future release.

Changing settings as suggested to:

jvm.options

## 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 

We get lots of errors:

Unrecognized VM option 'UseG1GC '
Did you mean '(+/-)UseG1GC'? Error: Could not create the Java Virtual Machine.

The only solution was to go back to the old config and comment out:

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

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