Update jvm options with default values for 7.6.0 (#691)

* update jvm options with default values for 7.6.0
* allow overriding heap dump path
This commit is contained in:
Julien Mailleret 2020-05-06 20:51:51 +02:00 committed by GitHub
parent 744e65c7a5
commit b32481a2d3
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 20 additions and 2 deletions

View file

@ -49,6 +49,7 @@ es_debian_startup_timeout: 10
# JVM custom parameters # JVM custom parameters
es_java_home: '' es_java_home: ''
es_jvm_custom_parameters: '' es_jvm_custom_parameters: ''
es_heap_dump_path: "/var/lib/elasticsearch"
# SSL/TLS parameters # SSL/TLS parameters
es_enable_auto_ssl_configuration: true es_enable_auto_ssl_configuration: true

View file

@ -37,12 +37,19 @@
################################################################ ################################################################
## GC configuration ## GC configuration
{% if es_version is version('7.6.0', '<') %}
-XX:+UseConcMarkSweepGC -XX:+UseConcMarkSweepGC
-XX:CMSInitiatingOccupancyFraction=75 -XX:CMSInitiatingOccupancyFraction=75
-XX:+UseCMSInitiatingOccupancyOnly -XX:+UseCMSInitiatingOccupancyOnly
{% else %}
8-13:-XX:+UseConcMarkSweepGC
8-13:-XX:CMSInitiatingOccupancyFraction=75
8-13:-XX:+UseCMSInitiatingOccupancyOnly
{% endif %}
## G1GC Configuration ## 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. # To use G1GC uncomment the lines below.
# 10-:-XX:-UseConcMarkSweepGC # 10-:-XX:-UseConcMarkSweepGC
# 10-:-XX:-UseCMSInitiatingOccupancyOnly # 10-:-XX:-UseCMSInitiatingOccupancyOnly
@ -53,6 +60,15 @@
# 10-:-XX:G1ReservePercent=25 # 10-:-XX:G1ReservePercent=25
# 10-:-XX:InitiatingHeapOccupancyPercent=30 # 10-:-XX:InitiatingHeapOccupancyPercent=30
{% endif %} {% 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', '<') %} {% if es_version is version('7.5.0', '<') %}
## DNS cache policy ## DNS cache policy
@ -100,6 +116,7 @@
-Dlog4j2.disable.jmx=true -Dlog4j2.disable.jmx=true
{% endif %} {% endif %}
## JVM temporary directory
-Djava.io.tmpdir=${ES_TMPDIR} -Djava.io.tmpdir=${ES_TMPDIR}
## heap dumps ## heap dumps
@ -110,7 +127,7 @@
# specify an alternative path for heap dumps; ensure the directory exists and # specify an alternative path for heap dumps; ensure the directory exists and
# has sufficient space # has sufficient space
-XX:HeapDumpPath=${heap.dump.path} -XX:HeapDumpPath={{ es_heap_dump_path }}
# specify an alternative path for JVM fatal error logs # specify an alternative path for JVM fatal error logs
-XX:ErrorFile={{ es_log_dir }}/hs_err_pid%p.log -XX:ErrorFile={{ es_log_dir }}/hs_err_pid%p.log