Increase Elastic Heap After Installation

Hello,

please note that I've installed ES using windows MSI
I'm trying to increase heap size using jvm.options as below

JVM configuration

################################################################
## IMPORTANT: JVM heap size
################################################################
##
## You should always set the min and max JVM heap
## size to the same value. For example, to set
## the heap to 4 GB, set:
##
-Xms10g
-Xmx10g
##
## See https://www.elastic.co/guide/en/elasticsearch/reference/current/heap-size.html
## for more information
##
################################################################

but every time I start Elasticsearch Heap still 2.4 G, noting that I installed it using .msi
and there is no elasticsearch-service-mgr.exe installed with it and there is no environment variables declared for ES jvm.

when I run elasticsearch.exe I got this line on the CMD

[2019-02-11T13:47:57,249][INFO ][o.e.e.NodeEnvironment ] [MININT-UCDE45F-Master] heap size [2.4gb], compressed ordinary object pointers [true]

any idea where is the 2.4 G is declared and how to increase it?.

Thanks in advance.

Hello joubeh,

What is your Elasticsearch version?

Hey mart

6.4.2

Alright. Did you try restart elasticsearch service after changed jvm?

yes sure.

Please check Elasticsearch log files. Up to your Elasticsearch version, there is only way to change heap from JVM options.

I've checked the logs and I found it as below

[2019-02-11T14:56:06,742][INFO ][o.e.n.Node               ] [MININT-UCDE45F-Master] initializing ...
[2019-02-11T14:56:06,817][INFO ][o.e.e.NodeEnvironment    ] [MININT-UCDE45F-Master] using [1] data paths, mounts [[Windows (C:)]], net usable_space [353.3gb], net total_space [471.6gb], types [NTFS]
[2019-02-11T14:56:06,817][INFO ][o.e.e.NodeEnvironment    ] [MININT-UCDE45F-Master] heap size [2.4gb], compressed ordinary object pointers [true]
[2019-02-11T14:56:08,021][INFO ][o.e.n.Node               ] [MININT-UCDE45F-Master] node name [MININT-UCDE45F-Master], node ID [_gCXu2YfRwSifBw3M5F8WA]
[2019-02-11T14:56:08,037][INFO ][o.e.n.Node               ] [MININT-UCDE45F-Master] version[6.4.2], pid[306812], build[unknown/unknown/04711c2/2018-09-26T13:34:09.098244Z], OS[Windows 10/10.0/amd64], JVM[Oracle Corporation/Java HotSpot(TM) 64-Bit Server VM/1.8.0_181/25.181-b13]
[2019-02-11T14:56:08,037][INFO ][o.e.n.Node               ] [MININT-UCDE45F-Master] JVM arguments [-Xms10240m, -Xmx10240m, -XX:+UseConcMarkSweepGC, -XX:CMSInitiatingOccupancyFraction=75, -XX:+UseCMSInitiatingOccupancyOnly, -XX:+AlwaysPreTouch, -Xss1m, -Djava.awt.headless=true, -Dfile.encoding=UTF-8, -Djna.nosys=true, -XX:-OmitStackTraceInFastThrow, -Dio.netty.noUnsafe=true, -Dio.netty.noKeySetOptimization=true, -Dio.netty.recycler.maxCapacityPerThread=0, -Dlog4j.shutdownHookEnabled=false, -Dlog4j2.disable.jmx=true, -Djava.io.tmpdir=C:\Users\ADMINI~1\AppData\Local\Temp\elasticsearch, -XX:+HeapDumpOnOutOfMemoryError, -XX:HeapDumpPath=data, -XX:ErrorFile=logs/hs_err_pid%p.log, -XX:+PrintGCDetails, -XX:+PrintGCDateStamps, -XX:+PrintTenuringDistribution, -XX:+PrintGCApplicationStoppedTime, -Xloggc:logs/gc.log, -XX:+UseGCLogFileRotation, -XX:NumberOfGCLogFiles=32, -XX:GCLogFileSize=64m, -Xmx2560m, -Xms2560m, -Delasticsearch, -Des.path.home=C:\Program Files\Elastic\Elasticsearch\6.4.2, -Des.path.conf=C:\ProgramData\Elastic\Elasticsearch\config]

its getting the maximum and minimum heap size from jvm.options but still heap is only 2.4 and I've 32 G ram so there is available memory to be deducted to ES

I found the problem , it seems that when you define the heap in the installer it define new arguments in the end of the jvm.options file so it keep overwrite the values that I'm defining in beginning of the file. so I just changed them and it works.

1 Like

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