Skip to content

Commit 6075c30

Browse files
committed
Restrict support for CMS to pre-JDK 14 (#49123)
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+.
1 parent a000d86 commit 6075c30

File tree

1 file changed

+11
-10
lines changed

1 file changed

+11
-10
lines changed

distribution/src/config/jvm.options

+11-10
Original file line numberDiff line numberDiff line change
@@ -33,18 +33,19 @@
3333
################################################################
3434

3535
## GC configuration
36-
-XX:+UseConcMarkSweepGC
37-
-XX:CMSInitiatingOccupancyFraction=75
38-
-XX:+UseCMSInitiatingOccupancyOnly
36+
8-13:-XX:+UseConcMarkSweepGC
37+
8-13:-XX:CMSInitiatingOccupancyFraction=75
38+
8-13:-XX:+UseCMSInitiatingOccupancyOnly
3939

4040
## G1GC Configuration
41-
# NOTE: G1GC is only supported on JDK version 10 or later.
42-
# To use G1GC uncomment the lines below.
43-
# 10-:-XX:-UseConcMarkSweepGC
44-
# 10-:-XX:-UseCMSInitiatingOccupancyOnly
45-
# 10-:-XX:+UseG1GC
46-
# 10-:-XX:G1ReservePercent=25
47-
# 10-:-XX:InitiatingHeapOccupancyPercent=30
41+
# NOTE: G1 GC is only supported on JDK version 10 or later
42+
# to use G1GC, uncomment the next two lines and update the version on the
43+
# following three lines to your version of the JDK
44+
# 10-13:-XX:-UseConcMarkSweepGC
45+
# 10-13:-XX:-UseCMSInitiatingOccupancyOnly
46+
14-:-XX:+UseG1GC
47+
14-:-XX:G1ReservePercent=25
48+
14-:-XX:InitiatingHeapOccupancyPercent=30
4849

4950
## JVM temporary directory
5051
-Djava.io.tmpdir=${ES_TMPDIR}

0 commit comments

Comments
 (0)