# Reducing Heap memory from 32 GB to less than 30.5 GB

**URL:** https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282
**Category:** Elasticsearch
**Created:** [March 23, 2016, 8:20pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282 "2016-03-23T20:20:09Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)
#### Post date: [March 23, 2016, 8:20pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/1 "2016-03-23T20:20:10Z")

</div>

Hi,

I have my cluster setup with 32 GB per node with 5 nodes in ES 1.5 cluster. But now I read in the Elasticsearch documentation that heap memory is recommended to be 30.5 GB or less so that ES would use 32 bit addressing. So, I bounced one node at time with 30 GB heap memory. So does this change the addressing from 64 bit to 32 bit? Or it would work only with complete cluster restart?

Request your clarification.  
Thanks.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 23, 2016, 8:34pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/2 "2016-03-23T20:34:23Z")

</div>

> [@vilas](#):
>
> So does this change the addressing from 64 bit to 32 bit?

No, it's a java pointer thing, but it is 32 bit.  
Looks like the link to the oracle page that explained this it out of date, will see if we can get it updated.

---

<div class="post-metadata">

### Author: ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)
#### Post date: [March 23, 2016, 8:36pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/3 "2016-03-23T20:36:05Z")

</div>

Oh is it the case. So, now setting up the node with 30.5 GB or 32 GB does not matter?  
As I mentioned we are not yet using Elasticsearch 2.0+. Currently using ES 1.5.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 23, 2016, 8:37pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/4 "2016-03-23T20:37:00Z")

</div>

> [@vilas](#):
>
> So, now setting up the node with 30.5 GB or 32 GB does not matter?

Yes it matters. Search for `java compressed oops` online.

---

<div class="post-metadata">

### Author: ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)
#### Post date: [March 23, 2016, 8:43pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/5 "2016-03-23T20:43:53Z")

</div>

So, thats great then. So it does not matter then if I did a full cluster restart or node by node for this to take affect right?

---

<div class="post-metadata">

### Author: ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)
#### Post date: [March 23, 2016, 8:48pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/6 "2016-03-23T20:48:13Z")

</div>

> [@warkolm](#):
>
> java compressed oops

Also, is it enabled automatically or do I need to use the flag?  
Because currently I restarted the nodes with 30 GB without any flag.

---

<div class="post-metadata">

### Author: ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)
#### Post date: [March 23, 2016, 8:58pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/7 "2016-03-23T20:58:06Z")

</div>

What flag? It just happens.  
Just stay under the limit as the docs state.

---

<div class="post-metadata">

### Author: ![vilas](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/vilas/32/613_2.png) [@vilas](https://discuss.elastic.co/u/vilas)
#### Post date: [March 23, 2016, 9:01pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/8 "2016-03-23T21:01:16Z")

</div>

I read online.. they talk about **-XX:+UseCompressedOops** flag.  
But if it happens automatically, then its great.

---

<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:05pm UTC](https://discuss.elastic.co/t/reducing-heap-memory-from-32-gb-to-less-than-30-5-gb/45282/9 "2017-07-05T23:05:42Z")

</div>


