# ES\_HEAP\_SIZE and node stats report don't match

**URL:** <https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936>\
**Category:** Elasticsearch\
**Created:** [November 25, 2014, 1:45pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936 "2014-11-25T13:45:04Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Vagif\_Abilov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vagif_abilov/32/788_2.png) [@Vagif\_Abilov](https://discuss.elastic.co/u/Vagif_Abilov)\
**Post date:** [November 25, 2014, 1:45pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936/1 "2014-11-25T13:45:04Z")

</div>

Hi,

In attempt to increase JVM heap size for Elasticsearch on a Windows box, I  
defined the following environment variable:

ES\_HEAP\_SIZE=6g

(The machine has 12G RAM in total).

I have restarted ES and queried its memory usage using \_nodes/stat HTTP GET  
command. However, it seems that it's still using 1GB:

mem: {

- heap\_used\_in\_bytes: 1032367576,
- heap\_used\_percent: 99,
- heap\_committed\_in\_bytes: 1037959168,
- heap\_max\_in\_bytes: 1037959168,
- ...

Shouldn't ES adjust its heap memory size after the restart?

Thanks in advance

Vagif

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/f927807a-dfae-419e-99d6-02db243f7052%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/f927807a-dfae-419e-99d6-02db243f7052%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Vagif\_Abilov](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vagif_abilov/32/788_2.png) [@Vagif\_Abilov](https://discuss.elastic.co/u/Vagif_Abilov)\
**Post date:** [November 25, 2014, 2:50pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936/2 "2014-11-25T14:50:58Z")

</div>

After I had uninstalled and reinstalled Elasticsearch Windows service, it  
correctly increased the JVM heap size. Just restarting it without  
reinstalling the service didn't work.

Vagif

On Tuesday, November 25, 2014 2:45:04 PM UTC+1, Vagif Abilov wrote:

> Hi,
> 
> In attempt to increase JVM heap size for Elasticsearch on a Windows box, I  
> defined the following environment variable:
> 
> ES\_HEAP\_SIZE=6g
> 
> (The machine has 12G RAM in total).
> 
> I have restarted ES and queried its memory usage using \_nodes/stat HTTP  
> GET command. However, it seems that it's still using 1GB:
> 
> mem: {
> 
> - heap\_used\_in\_bytes: 1032367576,
> - heap\_used\_percent: 99,
> - heap\_committed\_in\_bytes: 1037959168,
> - heap\_max\_in\_bytes: 1037959168,
> - ...
> 
> Shouldn't ES adjust its heap memory size after the restart?
> 
> Thanks in advance
> 
> Vagif

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/618bcc78-e708-47b3-a1b7-22ebf84c54b2%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/618bcc78-e708-47b3-a1b7-22ebf84c54b2%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![haldrich](https://avatars.discourse-cdn.com/v4/letter/h/b19c9b/32.png) [@haldrich](https://discuss.elastic.co/u/haldrich)\
**Post date:** [January 30, 2016, 12:46pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936/3 "2016-01-30T12:46:28Z")

</div>

Did anyone else confirm this as an issue?  
I see the exact same thing on my box, but really hate to uninstall the service if there is another way.

---

<div class="post-metadata">

**Author:** ![anhlqn](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/anhlqn/32/5454_2.png) [@anhlqn](https://discuss.elastic.co/u/anhlqn)\
**Post date:** [January 30, 2016, 9:29pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936/4 "2016-01-30T21:29:29Z")

</div>

Yes, there is another way. On windows, go to ES bin folder and run

> service manager

On one of the tabs of ES service properties, you can set min and max heap size. This is how you run multiple ES nodes with different heap size on the same machine.

---

<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:** [July 5, 2017, 11:20pm UTC](https://discuss.elastic.co/t/es-heap-size-and-node-stats-report-dont-match/20936/5 "2017-07-05T23:20:09Z")

</div>


