From 72009a9edd41dc2e3c29d4a6402d625e711cbacd Mon Sep 17 00:00:00 2001 From: Jason Tedor Date: Wed, 28 Oct 2020 08:49:31 -0400 Subject: [PATCH] Clarify preferred method for setting heap size (#64256) This commit clarifies that the preferred method for setting the heap size is via jvm.options.d and that using the ES_JAVA_OPTS environment variable is discouraged for production deployments. --- docs/reference/setup/important-settings/heap-size.asciidoc | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/docs/reference/setup/important-settings/heap-size.asciidoc b/docs/reference/setup/important-settings/heap-size.asciidoc index 9c64eddc846..ef297703ad4 100644 --- a/docs/reference/setup/important-settings/heap-size.asciidoc +++ b/docs/reference/setup/important-settings/heap-size.asciidoc @@ -66,7 +66,12 @@ Here is an example of how to set the heap size via a `jvm.options.d/` file: <1> Set the minimum heap size to 2g. <2> Set the maximum heap size to 2g. -You can set the heap size using the `ES_JAVA_OPTS` environment variable: +Using `jvm.options.d` is the preferred method for configuring the heap size for +production deployments. + +It is also possible to set the heap size via the `ES_JAVA_OPTS` environment +variable. This is generally discouraged for production deployments but is useful +for testing because it overrides all other means of setting JVM options. [source,sh] ------------------