1 {%- from "elasticsearch/map.jinja" import server with context -%}
4 ################################################################
5 ## IMPORTANT: JVM heap size
6 ################################################################
8 ## You should always set the min and max JVM heap
9 ## size to the same value. For example, to set
10 ## the heap to 4 GB, set:
15 ## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
16 ## for more information
18 ################################################################
20 # Xms represents the initial size of total heap space
21 # Xmx represents the maximum size of total heap space
23 -Xms{{ server.get('heap', {}).get('size', grains.get('mem_total', 1024)/2/1024)|round(0, 'ceil')|int }}g
24 -Xmx{{ server.get('heap', {}).get('size', grains.get('mem_total', 1024)/2/1024)|round(0, 'ceil')|int }}g
26 ################################################################
28 ################################################################
30 ## All settings below this section are considered
31 ## expert settings. Don't tamper with them unless
32 ## you understand what you are doing
34 ################################################################
37 -XX:+UseConcMarkSweepGC
38 -XX:CMSInitiatingOccupancyFraction=75
39 -XX:+UseCMSInitiatingOccupancyOnly
43 # pre-touch memory pages used by the JVM during initialization
48 # force the server VM (remove on 32-bit client JVMs)
51 # explicitly set the stack size (reduce to 320k on 32-bit client JVMs)
54 # set to headless, just in case
55 -Djava.awt.headless=true
57 # ensure UTF-8 encoding by default (e.g. filenames)
60 # use our provided JNA always versus the system one
63 # use old-style file permissions on JDK9
64 -Djdk.io.permissionsUseCanonicalPath=true
66 # flags to configure Netty
67 -Dio.netty.noUnsafe=true
68 -Dio.netty.noKeySetOptimization=true
69 -Dio.netty.recycler.maxCapacityPerThread=0
72 -Dlog4j.shutdownHookEnabled=false
73 -Dlog4j2.disable.jmx=true
74 -Dlog4j.skipJansi=true
78 # generate a heap dump when an allocation from the Java heap fails
79 # heap dumps are created in the working directory of the JVM
80 -XX:+HeapDumpOnOutOfMemoryError
82 # specify an alternative path for heap dumps
83 # ensure the directory exists and has sufficient space
84 #-XX:HeapDumpPath=${heap.dump.path}
89 #-XX:+PrintGCTimeStamps
90 #-XX:+PrintGCDateStamps
91 #-XX:+PrintClassHistogram
92 #-XX:+PrintTenuringDistribution
93 #-XX:+PrintGCApplicationStoppedTime
95 # log GC status to a file with time stamps
96 # ensure the directory exists
99 # By default, the GC log file will not rotate.
100 # By uncommenting the lines below, the GC log file
101 # will be rotated every 128MB at most 32 times.
102 #-XX:+UseGCLogFileRotation
103 #-XX:NumberOfGCLogFiles=32
104 #-XX:GCLogFileSize=128M
106 # Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON.
107 # If documents were already indexed with unquoted fields in a previous version
108 # of Elasticsearch, some operations may throw errors.
110 # WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided
111 # only for migration purposes.
112 #-Delasticsearch.json.allow_unquoted_field_names=true