Skip to content

Commit

Permalink
Use G1GC on JDK11+ (#2964) (#2971)
Browse files Browse the repository at this point in the history
Update default jvm settings to use G1GC by default for
JDK11 and greater.

Signed-off-by: Matt Weber <matt@mattweber.org>
(cherry picked from commit 8bfb082)

Co-authored-by: Matt Weber <matt@mattweber.org>
  • Loading branch information
opensearch-trigger-bot[bot] and mattweber committed Apr 19, 2022
1 parent d59ef2f commit 3571eab
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
Expand Up @@ -33,19 +33,19 @@
################################################################

## GC configuration
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
8-10:-XX:+UseConcMarkSweepGC
8-10:-XX:CMSInitiatingOccupancyFraction=75
8-10:-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
14-:-XX:G1ReservePercent=25
14-:-XX:InitiatingHeapOccupancyPercent=30
# 10:-XX:-UseConcMarkSweepGC
# 10:-XX:-UseCMSInitiatingOccupancyOnly
11-:-XX:+UseG1GC
11-:-XX:G1ReservePercent=25
11-:-XX:InitiatingHeapOccupancyPercent=30

## JVM temporary directory
-Djava.io.tmpdir=${OPENSEARCH_TMPDIR}
Expand Down

0 comments on commit 3571eab

Please sign in to comment.