| 1 |
## JVM configuration |
| 2 |
|
| 3 |
################################################################ |
| 4 |
## IMPORTANT: JVM heap size |
| 5 |
################################################################ |
| 6 |
## |
| 7 |
## You should always set the min and max JVM heap |
| 8 |
## size to the same value. For example, to set |
| 9 |
## the heap to 4 GB, set: |
| 10 |
## |
| 11 |
## -Xms4g |
| 12 |
## -Xmx4g |
| 13 |
## |
| 14 |
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html |
| 15 |
## for more information |
| 16 |
## |
| 17 |
################################################################ |
| 18 |
|
| 19 |
# Xms represents the initial size of total heap space |
| 20 |
# Xmx represents the maximum size of total heap space |
| 21 |
|
| 22 |
-Xms2g |
| 23 |
-Xmx2g |
| 24 |
|
| 25 |
################################################################ |
| 26 |
## Expert settings |
| 27 |
################################################################ |
| 28 |
## |
| 29 |
## All settings below this section are considered |
| 30 |
## expert settings. Don't tamper with them unless |
| 31 |
## you understand what you are doing |
| 32 |
## |
| 33 |
################################################################ |
| 34 |
|
| 35 |
## GC configuration |
| 36 |
-XX:+UseConcMarkSweepGC |
| 37 |
-XX:CMSInitiatingOccupancyFraction=75 |
| 38 |
-XX:+UseCMSInitiatingOccupancyOnly |
| 39 |
|
| 40 |
## optimizations |
| 41 |
|
| 42 |
# disable calls to System#gc |
| 43 |
-XX:+DisableExplicitGC |
| 44 |
|
| 45 |
# pre-touch memory pages used by the JVM during initialization |
| 46 |
-XX:+AlwaysPreTouch |
| 47 |
|
| 48 |
## basic |
| 49 |
|
| 50 |
# force the server VM |
| 51 |
-server |
| 52 |
|
| 53 |
# set to headless, just in case |
| 54 |
-Djava.awt.headless=true |
| 55 |
|
| 56 |
# ensure UTF-8 encoding by default (e.g. filenames) |
| 57 |
-Dfile.encoding=UTF-8 |
| 58 |
|
| 59 |
# use our provided JNA always versus the system one |
| 60 |
-Djna.nosys=true |
| 61 |
|
| 62 |
# flags to keep Netty from being unsafe |
| 63 |
-Dio.netty.noUnsafe=true |
| 64 |
-Dio.netty.noKeySetOptimization=true |
| 65 |
|
| 66 |
# log4j 2 |
| 67 |
-Dlog4j.shutdownHookEnabled=false |
| 68 |
-Dlog4j2.disable.jmx=true |
| 69 |
-Dlog4j.skipJansi=true |
| 70 |
|
| 71 |
## heap dumps |
| 72 |
|
| 73 |
# generate a heap dump when an allocation from the Java heap fails |
| 74 |
# heap dumps are created in the working directory of the JVM |
| 75 |
-XX:+HeapDumpOnOutOfMemoryError |
| 76 |
|
| 77 |
# specify an alternative path for heap dumps |
| 78 |
# ensure the directory exists and has sufficient space |
| 79 |
#-XX:HeapDumpPath=${heap.dump.path} |
| 80 |
|
| 81 |
## GC logging |
| 82 |
|
| 83 |
#-XX:+PrintGCDetails |
| 84 |
#-XX:+PrintGCTimeStamps |
| 85 |
#-XX:+PrintGCDateStamps |
| 86 |
#-XX:+PrintClassHistogram |
| 87 |
#-XX:+PrintTenuringDistribution |
| 88 |
#-XX:+PrintGCApplicationStoppedTime |
| 89 |
|
| 90 |
# log GC status to a file with time stamps |
| 91 |
# ensure the directory exists |
| 92 |
#-Xloggc:${loggc} |
| 93 |
|
| 94 |
# Elasticsearch 5.0.0 will throw an exception on unquoted field names in JSON. |
| 95 |
# If documents were already indexed with unquoted fields in a previous version |
| 96 |
# of Elasticsearch, some operations may throw errors. |
| 97 |
# |
| 98 |
# WARNING: This option will be removed in Elasticsearch 6.0.0 and is provided |
| 99 |
# only for migration purposes. |
| 100 |
#-Delasticsearch.json.allow_unquoted_field_names=true |