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

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


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?

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

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