# XMS-XMX settings set in the "options" files are ignored (elasticsearch-8.1, Windows)

**URL:** <https://discuss.elastic.co/t/xms-xmx-settings-set-in-the-options-files-are-ignored-elasticsearch-8-1-windows/345624>\
**Category:** Elasticsearch\
**Created:** [October 24, 2023, 9:40am UTC](https://discuss.elastic.co/t/xms-xmx-settings-set-in-the-options-files-are-ignored-elasticsearch-8-1-windows/345624 "2023-10-24T09:40:55Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![CrazyDiamond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crazydiamond/32/126794_2.png) [@CrazyDiamond](https://discuss.elastic.co/u/CrazyDiamond)\
**Post date:** [October 24, 2023, 9:40am UTC](https://discuss.elastic.co/t/xms-xmx-settings-set-in-the-options-files-are-ignored-elasticsearch-8-1-windows/345624/1 "2023-10-24T09:40:55Z")

</div>

Hello all.  
I use a certain product with a built-in Elastic installation (it is installed along with the product, I did not deploy it myself).  
The server (Windows) has 16GB RAM, and Elastic uses 8 (I see this in the process manager and in the Xms-Xmx parameters in the Elastic log).  
I want to force Elastic to use 6 or 4Gb.

For this I tried to add

```auto
-Xms4g
-Xmx4g

```

to the main jvm.options file, or also i tryed make separate .options file in Elasticsearch\elasticsearch-8.1.0\config\jvm.options.d\ directory and add here.

But nothing changes after i restart service: same amount of memory consuption, and same string in log:

> [2023-10-24T11:57:29,381][INFO][o.e.n.Node] [cmw] JVM arguments [-Des.networkaddress.cache.ttl=60, -Des.networkaddress.cache.negative.ttl=10, -Djava.security.manager=allow, -XX:+AlwaysPreTouch, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -XX:+ShowCodeDetailsInExceptionMessages, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dio.netty.allocator.numDirectArenas=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Dlog4j2.formatMsgNoLookups=true, -Djava.locale.providers=SPI,COMPAT, --add-opens=java.base/java.io=ALL-UNNAMED, -XX:+UseG1GC, -Djava.io.tmpdir=C:\Users\SVCPSI~1\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:+ExitOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs\_err\_pid%p.log, -XX:MaxDirectMemorySize=4294967296, -XX:InitiatingHeapOccupancyPercent=30, -XX:G1ReservePercent=25, -Delasticsearch, -Des.path.home=C:\Program Files\Elasticsearch\elasticsearch-8.1.0, -Des.path.conf=C:\Program Files\Elasticsearch\elasticsearch-8.1.0\config, -Des.distribution.flavor=default, -Des.distribution.type=zip, -Des.bundled\_jdk=true, exit, abort, -Xms8191m, -Xmx8191m, -Xss1024k]

I cant find anything about -Xms8191m, -Xmx8191m in ANY of bat files that i have in Elastic folder.  
Any ideas where it comes from and how to override these values?

---

<div class="post-metadata">

**Author:** ![CrazyDiamond](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/crazydiamond/32/126794_2.png) [@CrazyDiamond](https://discuss.elastic.co/u/CrazyDiamond)\
**Post date:** [October 24, 2023, 11:53am UTC](https://discuss.elastic.co/t/xms-xmx-settings-set-in-the-options-files-are-ignored-elasticsearch-8-1-windows/345624/2 "2023-10-24T11:53:35Z")

</div>

Found it in registry...  
`Computer\HKEY_LOCAL_MACHINE\SOFTWARE\WOW6432Node\Apache Software Foundation\Procrun 2.0\elasticsearch-service-x64\Parameters\Java`

---

<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:** [November 21, 2023, 11:54am UTC](https://discuss.elastic.co/t/xms-xmx-settings-set-in-the-options-files-are-ignored-elasticsearch-8-1-windows/345624/3 "2023-11-21T11:54:31Z")

</div>

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