Skip to content

Commit b76c4d8

Browse files
authored
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 82c00f0 commit b76c4d8

File tree

1 file changed

+11
-9
lines changed

1 file changed

+11
-9
lines changed

distribution/src/config/jvm.options

+11-9
Original file line numberDiff line numberDiff line change
@@ -33,16 +33,18 @@
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

40-
## G1GC Configuration; to use G1GC uncomment the lines below
41-
# -XX:-UseConcMarkSweepGC
42-
# -XX:-UseCMSInitiatingOccupancyOnly
43-
# -XX:+UseG1GC
44-
# -XX:G1ReservePercent=25
45-
# -XX:InitiatingHeapOccupancyPercent=30
40+
## G1GC Configuration
41+
# to use G1GC, uncomment the next two lines and update the version on the
42+
# following three lines to your version of the JDK
43+
# 8-13:-XX:-UseConcMarkSweepGC
44+
# 8-13:-XX:-UseCMSInitiatingOccupancyOnly
45+
14-:-XX:+UseG1GC
46+
14-:-XX:G1ReservePercent=25
47+
14-:-XX:InitiatingHeapOccupancyPercent=30
4648

4749
## JVM temporary directory
4850
-Djava.io.tmpdir=${ES_TMPDIR}

0 commit comments

Comments
 (0)