From ea0cdc4c7ee71207dd71222b3a9ff3e604884d9e Mon Sep 17 00:00:00 2001 From: Timo Beckers Date: Sun, 27 Aug 2017 17:21:11 +0200 Subject: [PATCH] lp-elastic - clean up jvm.options template --- lp-elastic/templates/jvm.options.j2 | 69 +++-------------------------- 1 file changed, 5 insertions(+), 64 deletions(-) diff --git a/lp-elastic/templates/jvm.options.j2 b/lp-elastic/templates/jvm.options.j2 index 92dd2dc..a8ef0d6 100644 --- a/lp-elastic/templates/jvm.options.j2 +++ b/lp-elastic/templates/jvm.options.j2 @@ -1,40 +1,10 @@ ## JVM configuration - -################################################################ -## IMPORTANT: JVM heap size -################################################################ -## -## You should always set the min and max JVM heap -## size to the same value. For example, to set -## the heap to 4 GB, set: -## -## -Xms4g -## -Xmx4g -## -## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html -## for more information -## -################################################################ +# {{ ansible_managed }} # Xms represents the initial size of total heap space # Xmx represents the maximum size of total heap space -{% if elasticsearch.heap is defined %} --Xms{{ elasticsearch.heap }} --Xmx{{ elasticsearch.heap }} -{% else %} --Xms2g --Xmx2g -{% endif %} - -################################################################ -## Expert settings -################################################################ -## -## All settings below this section are considered -## expert settings. Don't tamper with them unless -## you understand what you are doing -## -################################################################ +-Xms{{ elasticsearch.heap | default('2g') }} +-Xmx{{ elasticsearch.heap | default('2g') }} ## GC configuration -XX:+UseConcMarkSweepGC @@ -83,36 +53,7 @@ # ensure the directory exists and has sufficient space #-XX:HeapDumpPath=${heap.dump.path} -## GC logging - -#-XX:+PrintGCDetails -#-XX:+PrintGCTimeStamps -#-XX:+PrintGCDateStamps -#-XX:+PrintClassHistogram -#-XX:+PrintTenuringDistribution -#-XX:+PrintGCApplicationStoppedTime - -# log GC status to a file with time stamps -# ensure the directory exists -#-Xloggc:${loggc} - - -# By default, the GC log file will not rotate. -# By uncommenting the lines below, the GC log file -# will be rotated every 128MB at most 32 times. -#-XX:+UseGCLogFileRotation -#-XX:NumberOfGCLogFiles=32 -#-XX:GCLogFileSize=128M - -# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON. -# If documents were already indexed with unquoted fields in a previous version -# of Elasticsearch, some operations may throw errors. -# -# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided -# only for migration purposes. -#-Delasticsearch.json.allow_unquoted_field_names=true -{% if elasticsearch.jvm_custom_parameters !='' %} -{% for item in elasticsearch.jvm_custom_parameters %} +# Custom JVM params +{% for item in elasticsearch.jvm_custom_parameters | default([]) %} {{ item }} {% endfor %} -{% endif %}