Change Heap_size on ElasticSearch

(Tat Dat Pham) #1

Hi, i Have three node. and using Java on Centos 6.2

java version "1.8.0_66"
Java(TM) SE Runtime Environment (build 1.8.0_66-b17)
Java HotSpot(TM) 64-Bit Server VM (build 25.66-b17, mixed mode)

I set Heap_size on three node to 8Gb ( Machine have 16Gb RAM) with Command

export ES_HEAP_SIZE=10g

I restart all Node but when i check, Heap size is 1GB ???

i try to use command

bin/elasticsearch -Xmx8g -Xms8g

and get error

ERROR: Parameter [-Xmx8g]does not start with --

(Yodog) #2

see if this can help you:

on Debian, you can change this setting here


# Heap size defaults to 256m min, 1g max
# Set ES_HEAP_SIZE to 50% of available RAM, but no more than 31g

and then restart the service

(Tat Dat Pham) #3

Thank for suggest :smiley:
I found config in this


And change heap_size success !


what syntax is used o control the maximum and minimum size of the heap on the .yml file?

(ddorian43) #5


The .yml is read after elasticsearch is started, when it is too late to specify a heap (since the process has already started), that's why you can't configure it there

(system) #6