mirror of
https://git.lapiole.org/dani/ansible-roles.git
synced 2025-08-07 09:07:03 +02:00
Update to 2022-01-25 15:00
This commit is contained in:
46
roles/elasticsearch/templates/jvm.options.j2
Normal file
46
roles/elasticsearch/templates/jvm.options.j2
Normal file
@@ -0,0 +1,46 @@
|
||||
-Xms{{ es_memory }}
|
||||
-Xmx{{ es_memory }}
|
||||
## GC configuration
|
||||
8-13:-XX:+UseConcMarkSweepGC
|
||||
8-13:-XX:CMSInitiatingOccupancyFraction=75
|
||||
8-13:-XX:+UseCMSInitiatingOccupancyOnly
|
||||
# G1GC Configuration
|
||||
# NOTE: G1 GC is only supported on JDK version 10 or later
|
||||
# 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
|
||||
|
||||
## JVM temporary directory
|
||||
-Djava.io.tmpdir=${ES_TMPDIR}
|
||||
|
||||
## heap dumps
|
||||
|
||||
# generate a heap dump when an allocation from the Java heap fails; heap dumps
|
||||
# are created in the working directory of the JVM unless an alternative path is
|
||||
# specified
|
||||
-XX:+HeapDumpOnOutOfMemoryError
|
||||
# exit right after heap dump on out of memory error. Recommended to also use
|
||||
# on java 8 for supported versions (8u92+).
|
||||
9-:-XX:+ExitOnOutOfMemoryError
|
||||
|
||||
# specify an alternative path for heap dumps; ensure the directory exists and
|
||||
# has sufficient space
|
||||
-XX:HeapDumpPath={{ es_root_dir }}/data
|
||||
|
||||
# specify an alternative path for JVM fatal error logs
|
||||
-XX:ErrorFile={{ es_root_dir }}/logs/hs_err_pid%p.log
|
||||
|
||||
## JDK 8 GC logging
|
||||
8:-XX:+PrintGCDetails
|
||||
8:-XX:+PrintGCDateStamps
|
||||
8:-XX:+PrintTenuringDistribution
|
||||
8:-XX:+PrintGCApplicationStoppedTime
|
||||
8:-Xloggc:logs/gc.log
|
||||
8:-XX:+UseGCLogFileRotation
|
||||
8:-XX:NumberOfGCLogFiles=32
|
||||
8:-XX:GCLogFileSize=64m
|
||||
|
||||
# JDK 9+ GC logging
|
||||
9-:-Xlog:gc*,gc+age=trace,safepoint:file={{ es_root_dir }}/logs/gc.log:utctime,pid,tags:filecount=32,filesize=64m
|
Reference in New Issue
Block a user