Skip to content
This repository was archived by the owner on Jun 24, 2022. It is now read-only.

Update jvm options with default values for 7.6.0 #691

Merged
merged 4 commits into from
May 6, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions defaults/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ es_debian_startup_timeout: 10
# JVM custom parameters
es_java_home: ''
es_jvm_custom_parameters: ''
es_heap_dump_path: "/var/lib/elasticsearch"

# SSL/TLS parameters
es_enable_auto_ssl_configuration: true
Expand Down
21 changes: 19 additions & 2 deletions templates/jvm.options.j2
Original file line number Diff line number Diff line change
Expand Up @@ -37,12 +37,19 @@
################################################################

## GC configuration
{% if es_version is version('7.6.0', '<') %}
-XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly
{% else %}
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
{% endif %}

## G1GC Configuration
# NOTE: G1GC is only supported on JDK version 10 or later.
# NOTE: G1 GC is only supported on JDK version 10 or later
{% if es_version is version('7.6.0', '<') %}
# To use G1GC uncomment the lines below.
# 10-:-XX:-UseConcMarkSweepGC
# 10-:-XX:-UseCMSInitiatingOccupancyOnly
Expand All @@ -53,6 +60,15 @@
# 10-:-XX:G1ReservePercent=25
# 10-:-XX:InitiatingHeapOccupancyPercent=30
{% endif %}
{% else %}
# 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
{% endif %}

{% if es_version is version('7.5.0', '<') %}
## DNS cache policy
Expand Down Expand Up @@ -100,6 +116,7 @@
-Dlog4j2.disable.jmx=true
{% endif %}

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

## heap dumps
Expand All @@ -110,7 +127,7 @@

# specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space
-XX:HeapDumpPath=${heap.dump.path}
-XX:HeapDumpPath={{ es_heap_dump_path }}

# specify an alternative path for JVM fatal error logs
-XX:ErrorFile={{ es_log_dir }}/hs_err_pid%p.log
Expand Down