9 Replies Latest reply on Jun 9, 2020 7:27 AM by Andreas Mitterdorfer

    ARS 19.02 + Java 11: Recommended java GC options

    Andreas Mitterdorfer
      Share This:

      I upgraded a system to 19.02 (from 9.1.04) using java 8 successfully and wanted to switch to java 11 afterwards.

      When I used java 11 I noticed that the AR server does not start obviously due to the parameter +UseParNewGC:


      [remedy@vie-vm-102 conf]$ /opt/bmc/jdk/jre/bin/java -XX:+UseParNewGC -version

      Unrecognized VM option 'UseParNewGC'

      Error: Could not create the Java Virtual Machine.

      Error: A fatal exception has occurred. Program will exit.


      Addtionally -XX:+UseConcMarkSweepGC seems to be considered for removal aswell:

      [remedy@vie-vm-102 conf]$ /opt/bmc/jdk/jre/bin/java -XX:NewRatio=2 -XX:+DisableExplicitGC -XX:+UseConcMarkSweepGC --version

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

      openjdk 11.0.2 2019-01-15

      OpenJDK Runtime Environment 18.9 (build 11.0.2+9)

      OpenJDK 64-Bit Server VM 18.9 (build 11.0.2+9, mixed mode)


      jvm - Unrecognized VM option 'UseParNewGC' , Error: Could not create the Java Virtual Machine - Stack Overflow

      states that the +UseParNewGC is deprecated and removed and recommends to use -XX:+UseG1GC


      I removed +UseParNewGC and -XX:+UseConcMarkSweepGC, implemented -XX:+UseG1GC and ar server is starting again.


      However my question is, wheter anybody is aware of recommendations for GC settings for Java 11?

      KnowledgeArticle - BMC

      references the ones for Java 8 and I assume they might not be accurate anymore for Java 11.

      Is -XX:+UseConcMarkSweepGC still ok or should I rather use -XX:+UseG1GC ?

      I've searched but I haven't found anything on this topic - except KnowledgeArticle - BMC  -  but maybe I missed something.


      Sidenote FYI:

      Java 11 JDK does not have a jre directory anymore, so if you're using symlinks you have to adapt accordingly.

      Midtier/SmartIT/MyIT tomcat usually also have the -XX:+UseParNewGC implemented, so you need to adapt that aswell.