# Using custom JVM options files in jvm.options.d/ shows duplicate JVM args

**URL:** <https://discuss.elastic.co/t/using-custom-jvm-options-files-in-jvm-options-d-shows-duplicate-jvm-args/256188>\
**Category:** Elasticsearch\
**Created:** [November 20, 2020, 8:43pm UTC](https://discuss.elastic.co/t/using-custom-jvm-options-files-in-jvm-options-d-shows-duplicate-jvm-args/256188 "2020-11-20T20:43:42Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ben-charles](https://avatars.discourse-cdn.com/v4/letter/b/9f8e36/32.png) [@ben-charles](https://discuss.elastic.co/u/ben-charles)\
**Post date:** [November 20, 2020, 8:43pm UTC](https://discuss.elastic.co/t/using-custom-jvm-options-files-in-jvm-options-d-shows-duplicate-jvm-args/256188/1 "2020-11-20T20:43:42Z")

</div>

I have a `custom.options` file in my `config/jvm.options.d/` directory with the following contents:

```
-Xms2g
-Xmx2g

```

When looking at the running Elasticsearch process, I see that there are two sets of command line parameters for the running process:

`-Xms1g -Xms1g ... -Xms2g -Xms2g`

Presumably the first set of heap configurations is coming from the default `jvm.options` file, and the second set is coming from my custom JVM option file. Is this expected behavior? It seems like the second set of configurations is what gets applied, but it is misleading. It can be confusing to figure out which JVM flag is being applied.

---

<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:** [December 18, 2020, 8:43pm UTC](https://discuss.elastic.co/t/using-custom-jvm-options-files-in-jvm-options-d-shows-duplicate-jvm-args/256188/2 "2020-12-18T20:43:53Z")

</div>

Closed on December 18, 2020, 8:43pm UTC

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