File tree 3 files changed +17
-0
lines changed
distribution/src/main/resources/bin
3 files changed +17
-0
lines changed Original file line number Diff line number Diff line change @@ -85,6 +85,10 @@ REM JAVA_OPTS=%JAVA_OPTS% -XX:HeapDumpPath=$ES_HOME/logs/heapdump.hprof
85
85
REM Disables explicit GC
86
86
set JAVA_OPTS = %JAVA_OPTS% -XX:+DisableExplicitGC
87
87
88
+ REM Enable pre-touching of memory pages used by the JVM during hotspot
89
+ REM initialization
90
+ set JAVA_OPTS = %JAVA_OPTS% -XX:+AlwaysPreTouch
91
+
88
92
REM Ensure UTF-8 encoding by default (e.g. filenames)
89
93
set JAVA_OPTS = %JAVA_OPTS% -Dfile.encoding=UTF-8
90
94
Original file line number Diff line number Diff line change @@ -81,6 +81,10 @@ JAVA_OPTS="$JAVA_OPTS -XX:+HeapDumpOnOutOfMemoryError"
81
81
# Disables explicit GC
82
82
JAVA_OPTS=" $JAVA_OPTS -XX:+DisableExplicitGC"
83
83
84
+ # Enable pre-touching of memory pages used by the JVM during hotspot
85
+ # initialization
86
+ JAVA_OPTS=" $JAVA_OPTS -XX:+AlwaysPreTouch"
87
+
84
88
# Ensure UTF-8 encoding by default (e.g. filenames)
85
89
JAVA_OPTS=" $JAVA_OPTS -Dfile.encoding=UTF-8"
86
90
Original file line number Diff line number Diff line change @@ -808,6 +808,15 @@ changed to now route standard output to the journal and standard error
808
808
to inherit this setting (these are the defaults for systemd). These
809
809
settings can be modified by editing the elasticsearch.service file.
810
810
811
+ ==== Longer startup times
812
+
813
+ In Elasticsearch 5.0.0 the `-XX:+AlwaysPreTouch` flag has been added to the JVM
814
+ startup options. This option touches all memory pages used by the JVM heap
815
+ during initialization of the HotSpot VM to reduce the chance of having to commit
816
+ a memory page during GC time. This will increase the startup time of
817
+ Elasticsearch as well as increasing the initial resident memory usage of the
818
+ Java process.
819
+
811
820
[[breaking_50_scripting]]
812
821
=== Scripting
813
822
You can’t perform that action at this time.
0 commit comments