# JVM options file vs. ES\_JAVA\_OPTS on ECK for setting heap size

**URL:** <https://discuss.elastic.co/t/jvm-options-file-vs-es-java-opts-on-eck-for-setting-heap-size/324051>\
**Category:** Elastic Cloud on Kubernetes (ECK)\
**Created:** [January 26, 2023, 5:25pm UTC](https://discuss.elastic.co/t/jvm-options-file-vs-es-java-opts-on-eck-for-setting-heap-size/324051 "2023-01-26T17:25:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Thomas\_Antonio](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/thomas_antonio/32/116442_2.png) [@Thomas\_Antonio](https://discuss.elastic.co/u/Thomas_Antonio)\
**Post date:** [January 26, 2023, 5:25pm UTC](https://discuss.elastic.co/t/jvm-options-file-vs-es-java-opts-on-eck-for-setting-heap-size/324051/1 "2023-01-26T17:25:51Z")

</div>

ECK [documentation](https://www.elastic.co/guide/en/cloud-on-k8s/2.5/k8s-managing-compute-resources.html#k8s-elasticsearch-memory) says to configure heap size using ES\_JAVA\_OPTS environment variable. But [Elasticsearch docs](https://www.elastic.co/guide/en/elasticsearch/reference/8.6/advanced-configuration.html#set-jvm-heap-size) say to not use ES\_JAVA\_OPTS in production and instead use an options file.

Is this a gap in ECK documentation?

Also, I am running ES 7.5, and documentation that far back doesn't mention configured heap size. Does that impact which solution I should use?

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [February 23, 2023, 5:26pm UTC](https://discuss.elastic.co/t/jvm-options-file-vs-es-java-opts-on-eck-for-setting-heap-size/324051/2 "2023-02-23T17:26:48Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
