diff --git a/distribution/src/main/resources/config/jvm.options b/distribution/src/main/resources/config/jvm.options index 691d681c05e..e82b9c245c2 100644 --- a/distribution/src/main/resources/config/jvm.options +++ b/distribution/src/main/resources/config/jvm.options @@ -1,41 +1,38 @@ -### configuration +## JVM configuration -## basic +################################################################ +## 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 +## +################################################################ -# set to headless, just in case --Djava.awt.headless=true +# Xms represents the initial size of total heap space +# Xmx represents the maximum size of total heap space -# ensure UTF-8 encoding by default (e.g. filenames) --Dfile.encoding=UTF-8 - -# use our provided JNA always versus the system one --Djna.nosys=true - -## networking - -# force the JVM to use the IPv4 stack -#-Djava.net.preferIPv4Stack=true - -### memory - -## heap configuration - -# minimum size of total heap space -Xms${heap.min} - -# maximum size of total heap space -# it is recommended to set the minimum size and maximum size equal to -# each other to prevent pauses upon resize, and so that memory locking -# will lock the entire heap in physical memory -Xmx${heap.max} -# size of young generation heap space -#-Xmn${new.size} +################################################################ +## Expert settings +################################################################ +## +## All settings below this section are considered +## expert settings. Don't tamper with them unless +## you understand what you are doing +## +################################################################ -# maximum size of NIO direct-buffer allocations -#-XX:MaxDirectMemorySize${max.direct.memory.size} - -## CMS configuration +## GC configuration -XX:+UseParNewGC -XX:+UseConcMarkSweepGC -XX:CMSInitiatingOccupancyFraction=75 @@ -49,6 +46,17 @@ # pre-touch memory pages used by the JVM during initialization -XX:+AlwaysPreTouch +## basic + +# set to headless, just in case +-Djava.awt.headless=true + +# ensure UTF-8 encoding by default (e.g. filenames) +-Dfile.encoding=UTF-8 + +# use our provided JNA always versus the system one +-Djna.nosys=true + ## heap dumps # generate a heap dump when an allocation from the Java heap fails