From 11a6a2f9d39a4624c5162c5dbf8da56c446c6ae0 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 14 Nov 2019 17:49:20 -0500 Subject: [PATCH 1/2] Restrict support for CMS to pre-JDK 14 JDK 14 has removed CMS. This commit restricts the support for CMS to JDK 8 through JDK 13, and defaults to G1 GC on JDK 14. We will revisit all defaults in the future, but this ensures that we run with a properly-configured garbage collector on JDK 14+. --- distribution/src/config/jvm.options | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/distribution/src/config/jvm.options b/distribution/src/config/jvm.options index 1e1add5107580..6ed955bdbf41d 100644 --- a/distribution/src/config/jvm.options +++ b/distribution/src/config/jvm.options @@ -33,16 +33,18 @@ ################################################################ ## GC configuration --XX:+UseConcMarkSweepGC --XX:CMSInitiatingOccupancyFraction=75 --XX:+UseCMSInitiatingOccupancyOnly +8-13:-XX:+UseConcMarkSweepGC +8-13:-XX:CMSInitiatingOccupancyFraction=75 +8-13:-XX:+UseCMSInitiatingOccupancyOnly -## G1GC Configuration; to use G1GC uncomment the lines below -# -XX:-UseConcMarkSweepGC -# -XX:-UseCMSInitiatingOccupancyOnly -# -XX:+UseG1GC -# -XX:G1ReservePercent=25 -# -XX:InitiatingHeapOccupancyPercent=30 +## G1GC Configuration +# to use G1GC, uncomment the next line and update the version on the following +# lines to your version of the JDK +# 8-13:-XX:-UseConcMarkSweepGC +14-:-XX:-UseCMSInitiatingOccupancyOnly +14-:-XX:+UseG1GC +14-:-XX:G1ReservePercent=25 +14-:-XX:InitiatingHeapOccupancyPercent=30 ## JVM temporary directory -Djava.io.tmpdir=${ES_TMPDIR} From d282f032e3655506eca0372674f4c10283c914c6 Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Thu, 14 Nov 2019 18:05:07 -0500 Subject: [PATCH 2/2] Iteration --- distribution/src/config/jvm.options | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/distribution/src/config/jvm.options b/distribution/src/config/jvm.options index 6ed955bdbf41d..dcfefa1ea1cc5 100644 --- a/distribution/src/config/jvm.options +++ b/distribution/src/config/jvm.options @@ -38,10 +38,10 @@ 8-13:-XX:+UseCMSInitiatingOccupancyOnly ## G1GC Configuration -# to use G1GC, uncomment the next line and update the version on the following -# lines to your version of the JDK +# to use G1GC, uncomment the next two lines and update the version on the +# following three lines to your version of the JDK # 8-13:-XX:-UseConcMarkSweepGC -14-:-XX:-UseCMSInitiatingOccupancyOnly +# 8-13:-XX:-UseCMSInitiatingOccupancyOnly 14-:-XX:+UseG1GC 14-:-XX:G1ReservePercent=25 14-:-XX:InitiatingHeapOccupancyPercent=30