Increase heap size of elasticsearch

How to increase heap size of elasticsearch.

I have tried some of the things like changing ES_HEAP_SIZE=16g in /etc/sysconfig/elasticsearch but this didn't effect.

I have installed elastic search directly through the directory, I haven't used any RPM or debain or any other.
Please help me.

Thank You

Set the ES_HEAP_SIZE variable in whatever script you're using to start bin/elasticsearch. There's documentation about it at the top of that file.

Yeah ..Got It .

Thank You