Clarify usage of jvm.options in its comments (#61456)

Since #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.
This commit is contained in:
David Turner 2020-12-03 10:55:53 +00:00 committed by GitHub
parent 47cb23cb16
commit 1a3fefb2ac
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -1,12 +1,29 @@
################################################################
##
## JVM configuration ## JVM configuration
##
################################################################
##
## 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 ## IMPORTANT: JVM heap size
################################################################ ################################################################
## ##
## You should always set the min and max JVM heap ## You must always set the initial and maximum JVM heap size to
## size to the same value. For example, to set ## the same value. For example, to set the heap to 4 GB, create
## the heap to 4 GB, set: ## a new file in the jvm.options.d directory containing these
## lines:
## ##
## -Xms4g ## -Xms4g
## -Xmx4g ## -Xmx4g
@ -16,19 +33,22 @@
## ##
################################################################ ################################################################
# Xms represents the initial size of total heap space # Xms represents the initial size of the JVM heap
# Xmx represents the maximum size of total heap space # Xmx represents the maximum size of the JVM heap
-Xms${heap.min} -Xms${heap.min}
-Xmx${heap.max} -Xmx${heap.max}
################################################################ ################################################################
## Expert settings ## Expert settings
################################################################ ################################################################
## ##
## All settings below this section are considered ## All settings below here are considered expert settings. Do
## expert settings. Don't tamper with them unless ## not adjust them unless you understand what you are doing. Do
## you understand what you are doing ## not edit them in this file; instead, create a new file in the
## jvm.options.d directory containing your adjustments.
## ##
################################################################ ################################################################
@ -49,8 +69,9 @@
## heap dumps ## heap dumps
# generate a heap dump when an allocation from the Java heap fails # generate a heap dump when an allocation from the Java heap fails; heap dumps
# heap dumps are created in the working directory of the JVM # are created in the working directory of the JVM unless an alternative path is
# specified
-XX:+HeapDumpOnOutOfMemoryError -XX:+HeapDumpOnOutOfMemoryError
# specify an alternative path for heap dumps; ensure the directory exists and # specify an alternative path for heap dumps; ensure the directory exists and