Skip to content

Commit

Permalink
Clarify usage of jvm.options in its comments
Browse files Browse the repository at this point in the history
Since elastic#51882 we recommend not editing the `jvm.options` file, preferring
instead to override its contents with additional files in
`jvm.options.d`. However the inline comments in this file do not point
users in that direction. This commit adjusts these inline comments.
  • Loading branch information
DaveCTurner committed Aug 24, 2020
1 parent d6a0642 commit dcd76b2
Showing 1 changed file with 33 additions and 11 deletions.
44 changes: 33 additions & 11 deletions distribution/src/config/jvm.options
Original file line number Diff line number Diff line change
@@ -1,12 +1,29 @@
## JVM configuration
################################################################
##
## JVM Options
##
################################################################
##
## WARNING: DO NOT EDIT THIS FILE. If you want to override the
## JVM options in this file, or set any additional options, you
## should create one or more files in the jvm.options.d
## directory containing your adjustments.
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/jvm-options.html
## for more information.
##
################################################################



################################################################
## 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:
## You must always set the initial and maximum JVM heap size to
## the same value. For example, to set the heap to 4 GB, create
## a new file in the jvm.options.d directory containing these
## lines:
##
## -Xms4g
## -Xmx4g
Expand All @@ -16,19 +33,23 @@
##
################################################################

# Xms represents the initial size of total heap space
# Xmx represents the maximum size of total heap space
# Xms represents the initial size of the JVM heap
# Xmx represents the maximum size of the JVM heap

-Xms${heap.min}
-Xmx${heap.max}



################################################################
## Expert settings
################################################################
##
## All settings below this section are considered
## expert settings. Don't tamper with them unless
## you understand what you are doing
## All settings below here are considered expert settings. Do
## not tamper with them unless you understand what you are
## doing. If you want to adjust any of these settings then do
## not do so by editing this file; instead, create a new file in
## the jvm.options.d directory to override these settings.
##
################################################################

Expand All @@ -51,8 +72,9 @@

## 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
# 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

# specify an alternative path for heap dumps; ensure the directory exists and
Expand Down

0 comments on commit dcd76b2

Please sign in to comment.