# What is using all my heap space?

**URL:** <https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344>\
**Category:** Elasticsearch\
**Created:** [December 21, 2014, 4:10pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344 "2014-12-21T16:10:33Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jeff\_Rick](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jeff\_Rick](https://discuss.elastic.co/u/Jeff_Rick)\
**Post date:** [December 21, 2014, 4:10pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/1 "2014-12-21T16:10:33Z")

</div>

Hi,

So we have a small development cluster that we are doing some sizing tests  
with. The make-up of the cluster as is follows:

4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB per  
node for heap  
1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) - 32GB  
per node for heap

We have around 280GB of data and 250M documents in a single index. This  
index is a readonly index, we do no indexing. My question is what is using  
the heap?

I am showing 82GB of heap used of 155GB total. The Field Data Cache is  
using 16GB and the Filter Cache is using 12 GB with another 1GB being used  
by Lucene. Query Cache on the data nodes is next to nothing and on the  
query node it is a less than a GB. So what could be using the remaining  
50GB?

[https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
Thanks

--  
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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [December 21, 2014, 7:53pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/2 "2014-12-21T19:53:16Z")

</div>

You should reduce your heap to half your system RAM, ie 30GB, so it's not  
more than 31GB. Above that your java pointers aren't compressed and you get  
less efficient heap use.

What sort of data is it, how many shards in your index, are your queries  
heavy (ie lots of aggs), are you using parent+child relationships?

On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:

> Hi,
> 
> So we have a small development cluster that we are doing some sizing tests  
> with. The make-up of the cluster as is follows:
> 
> 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB per  
> node for heap  
> 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) - 32GB  
> per node for heap
> 
> We have around 280GB of data and 250M documents in a single index. This  
> index is a readonly index, we do no indexing. My question is what is using  
> the heap?
> 
> I am showing 82GB of heap used of 155GB total. The Field Data Cache is  
> using 16GB and the Filter Cache is using 12 GB with another 1GB being used  
> by Lucene. Query Cache on the data nodes is next to nothing and on the  
> query node it is a less than a GB. So what could be using the remaining  
> 50GB?
> 
> [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> Thanks
> 
> --  
> 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Rick](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jeff\_Rick](https://discuss.elastic.co/u/Jeff_Rick)\
**Post date:** [December 21, 2014, 8:04pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/3 "2014-12-21T20:04:37Z")

</div>

So each node has 60gb of memory and heap is set to 32gb.

This is Medical data, we do lots of aggregations but no parent child relationships. We currently have 36 shards for the index.

—  
Thanks

On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> You should reduce your heap to half your system RAM, ie 30GB, so it's not  
> more than 31GB. Above that your java pointers aren't compressed and you get  
> less efficient heap use.  
> What sort of data is it, how many shards in your index, are your queries  
> heavy (ie lots of aggs), are you using parent+child relationships?  
> On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> 
> > Hi,
> > 
> > So we have a small development cluster that we are doing some sizing tests  
> > with. The make-up of the cluster as is follows:
> > 
> > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB per  
> > node for heap  
> > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) - 32GB  
> > per node for heap
> > 
> > We have around 280GB of data and 250M documents in a single index. This  
> > index is a readonly index, we do no indexing. My question is what is using  
> > the heap?
> > 
> > I am showing 82GB of heap used of 155GB total. The Field Data Cache is  
> > using 16GB and the Filter Cache is using 12 GB with another 1GB being used  
> > by Lucene. Query Cache on the data nodes is next to nothing and on the  
> > query node it is a less than a GB. So what could be using the remaining  
> > 50GB?
> > 
> > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > Thanks
> > 
> > --  
> > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [December 21, 2014, 8:46pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/4 "2014-12-21T20:46:57Z")

</div>

That's way too many shards, you only really need 1 shard per node, unless  
you're expecting to dramatically increase your node count in the near  
future.

More info on what data it is would be useful; are the docs large, numerous,  
are you using relationships as I mentioned?  
What about your querying? Lots of aggregations/facets?

And as I mentioned, you lose performance by having a 32GB heap, I'd  
strongly recommonend you reduce it.

On 21 December 2014 at 20:04, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:

> So each node has 60gb of memory and heap is set to 32gb.
> 
> This is Medical data, we do lots of aggregations but no parent child  
> relationships. We currently have 36 shards for the index.
> 
> —  
> Thanks
> 
> On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:
> 
> > You should reduce your heap to half your system RAM, ie 30GB, so it's  
> > not more than 31GB. Above that your java pointers aren't compressed and you  
> > get less efficient heap use.
> > 
> > What sort of data is it, how many shards in your index, are your queries  
> > heavy (ie lots of aggs), are you using parent+child relationships?
> > 
> > On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > 
> > > Hi,
> > > 
> > > So we have a small development cluster that we are doing some sizing  
> > > tests with. The make-up of the cluster as is follows:
> > > 
> > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB per  
> > > node for heap  
> > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) -  
> > > 32GB per node for heap
> > > 
> > > We have around 280GB of data and 250M documents in a single index. This  
> > > index is a readonly index, we do no indexing. My question is what is using  
> > > the heap?
> > > 
> > > I am showing 82GB of heap used of 155GB total. The Field Data Cache is  
> > > using 16GB and the Filter Cache is using 12 GB with another 1GB being used  
> > > by Lucene. Query Cache on the data nodes is next to nothing and on the  
> > > query node it is a less than a GB. So what could be using the remaining  
> > > 50GB?
> > > 
> > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > Thanks
> > > 
> > > --  
> > > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Rick](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jeff\_Rick](https://discuss.elastic.co/u/Jeff_Rick)\
**Post date:** [December 21, 2014, 9:26pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/5 "2014-12-21T21:26:54Z")

</div>

Larger documents maybe 1-2k a piece. We do aggregations/facets with some search.

What heap should we have on a node with 60gb of memory?. Right now we get an occasional out of memory and long GCs.

—  
Thanks

On Sun, Dec 21, 2014 at 3:47 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> That's way too many shards, you only really need 1 shard per node, unless  
> you're expecting to dramatically increase your node count in the near  
> future.  
> More info on what data it is would be useful; are the docs large, numerous,  
> are you using relationships as I mentioned?  
> What about your querying? Lots of aggregations/facets?  
> And as I mentioned, you lose performance by having a 32GB heap, I'd  
> strongly recommonend you reduce it.  
> On 21 December 2014 at 20:04, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> 
> > So each node has 60gb of memory and heap is set to 32gb.
> > 
> > This is Medical data, we do lots of aggregations but no parent child  
> > relationships. We currently have 36 shards for the index.
> > 
> > —  
> > Thanks
> > 
> > On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:
> > 
> > > You should reduce your heap to half your system RAM, ie 30GB, so it's  
> > > not more than 31GB. Above that your java pointers aren't compressed and you  
> > > get less efficient heap use.
> > > 
> > > What sort of data is it, how many shards in your index, are your queries  
> > > heavy (ie lots of aggs), are you using parent+child relationships?
> > > 
> > > On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > 
> > > > Hi,
> > > > 
> > > > So we have a small development cluster that we are doing some sizing  
> > > > tests with. The make-up of the cluster as is follows:
> > > > 
> > > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB per  
> > > > node for heap  
> > > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) -  
> > > > 32GB per node for heap
> > > > 
> > > > We have around 280GB of data and 250M documents in a single index. This  
> > > > index is a readonly index, we do no indexing. My question is what is using  
> > > > the heap?
> > > > 
> > > > I am showing 82GB of heap used of 155GB total. The Field Data Cache is  
> > > > using 16GB and the Filter Cache is using 12 GB with another 1GB being used  
> > > > by Lucene. Query Cache on the data nodes is next to nothing and on the  
> > > > query node it is a less than a GB. So what could be using the remaining  
> > > > 50GB?
> > > > 
> > > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > > Thanks
> > > > 
> > > > --  
> > > > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > > To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com).  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/1419197214304.1e105e4b%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [December 21, 2014, 9:45pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/6 "2014-12-21T21:45:05Z")

</div>

My original response has a suggestion on heap setting.

Are you using Oracle or OpenJDK? The former has better performance so it  
might be worth changing if you're not using it. What version of ES are you  
using?  
Given this is dev, I'd suggest you also install the Marvel plugin to give  
you some insights into what is happening.

On 21 December 2014 at 21:26, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:

> Larger documents maybe 1-2k a piece. We do aggregations/facets with some  
> search.
> 
> What heap should we have on a node with 60gb of memory?. Right now we get  
> an occasional out of memory and long GCs.
> 
> —  
> Thanks
> 
> On Sun, Dec 21, 2014 at 3:47 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:
> 
> > That's way too many shards, you only really need 1 shard per node,  
> > unless you're expecting to dramatically increase your node count in the  
> > near future.
> > 
> > More info on what data it is would be useful; are the docs large,  
> > numerous, are you using relationships as I mentioned?  
> > What about your querying? Lots of aggregations/facets?
> > 
> > And as I mentioned, you lose performance by having a 32GB heap, I'd  
> > strongly recommonend you reduce it.
> > 
> > On 21 December 2014 at 20:04, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > 
> > > So each node has 60gb of memory and heap is set to 32gb.
> > > 
> > > This is Medical data, we do lots of aggregations but no parent child  
> > > relationships. We currently have 36 shards for the index.
> > > 
> > > —  
> > > Thanks
> > > 
> > > On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com)  
> > > wrote:
> > > 
> > > > You should reduce your heap to half your system RAM, ie 30GB, so it's  
> > > > not more than 31GB. Above that your java pointers aren't compressed and you  
> > > > get less efficient heap use.
> > > > 
> > > > What sort of data is it, how many shards in your index, are your  
> > > > queries heavy (ie lots of aggs), are you using parent+child relationships?
> > > > 
> > > > On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > > 
> > > > > Hi,
> > > > > 
> > > > > So we have a small development cluster that we are doing some sizing  
> > > > > tests with. The make-up of the cluster as is follows:
> > > > > 
> > > > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB  
> > > > > per node for heap  
> > > > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) -  
> > > > > 32GB per node for heap
> > > > > 
> > > > > We have around 280GB of data and 250M documents in a single index.  
> > > > > This index is a readonly index, we do no indexing. My question is what is  
> > > > > using the heap?
> > > > > 
> > > > > I am showing 82GB of heap used of 155GB total. The Field Data Cache  
> > > > > is using 16GB and the Filter Cache is using 12 GB with another 1GB being  
> > > > > used by Lucene. Query Cache on the data nodes is next to nothing and on  
> > > > > the query node it is a less than a GB. So what could be using the  
> > > > > remaining 50GB?
> > > > > 
> > > > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > > > Thanks
> > > > > 
> > > > > --  
> > > > > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > .  
> > > > To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> > > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/1419197214304.1e105e4b%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer)  
> [https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Rick](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jeff\_Rick](https://discuss.elastic.co/u/Jeff_Rick)\
**Post date:** [December 21, 2014, 10:00pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/7 "2014-12-21T22:00:16Z")

</div>

Hi Mark,

I really appreciate the advice and sorry I missed the earlier suggestion on  
heap.

We are running 1.4.0 and Oracle:

java version "1.7.0\_55"

Java(TM) SE Runtime Environment (build 1.7.0\_55-b13)

Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)

We have installed Marvel on the cluster and on the original message I  
posted a screen shot from the dashboard.

Thanks

On Sun, Dec 21, 2014 at 4:45 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:

> My original response has a suggestion on heap setting.
> 
> Are you using Oracle or OpenJDK? The former has better performance so it  
> might be worth changing if you're not using it. What version of ES are you  
> using?  
> Given this is dev, I'd suggest you also install the Marvel plugin to give  
> you some insights into what is happening.
> 
> On 21 December 2014 at 21:26, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> 
> > Larger documents maybe 1-2k a piece. We do aggregations/facets with some  
> > search.
> > 
> > What heap should we have on a node with 60gb of memory?. Right now we get  
> > an occasional out of memory and long GCs.
> > 
> > —  
> > Thanks
> > 
> > On Sun, Dec 21, 2014 at 3:47 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com)  
> > wrote:
> > 
> > > That's way too many shards, you only really need 1 shard per node,  
> > > unless you're expecting to dramatically increase your node count in the  
> > > near future.
> > > 
> > > More info on what data it is would be useful; are the docs large,  
> > > numerous, are you using relationships as I mentioned?  
> > > What about your querying? Lots of aggregations/facets?
> > > 
> > > And as I mentioned, you lose performance by having a 32GB heap, I'd  
> > > strongly recommonend you reduce it.
> > > 
> > > On 21 December 2014 at 20:04, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > 
> > > > So each node has 60gb of memory and heap is set to 32gb.
> > > > 
> > > > This is Medical data, we do lots of aggregations but no parent child  
> > > > relationships. We currently have 36 shards for the index.
> > > > 
> > > > —  
> > > > Thanks
> > > > 
> > > > On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com)  
> > > > wrote:
> > > > 
> > > > > You should reduce your heap to half your system RAM, ie 30GB, so  
> > > > > it's not more than 31GB. Above that your java pointers aren't compressed  
> > > > > and you get less efficient heap use.
> > > > > 
> > > > > What sort of data is it, how many shards in your index, are your  
> > > > > queries heavy (ie lots of aggs), are you using parent+child relationships?
> > > > > 
> > > > > On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > > > 
> > > > > > Hi,
> > > > > > 
> > > > > > So we have a small development cluster that we are doing some sizing  
> > > > > > tests with. The make-up of the cluster as is follows:
> > > > > > 
> > > > > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB  
> > > > > > per node for heap  
> > > > > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge) -  
> > > > > > 32GB per node for heap
> > > > > > 
> > > > > > We have around 280GB of data and 250M documents in a single index.  
> > > > > > This index is a readonly index, we do no indexing. My question is what is  
> > > > > > using the heap?
> > > > > > 
> > > > > > I am showing 82GB of heap used of 155GB total. The Field Data Cache  
> > > > > > is using 16GB and the Filter Cache is using 12 GB with another 1GB being  
> > > > > > used by Lucene. Query Cache on the data nodes is next to nothing and on  
> > > > > > the query node it is a less than a GB. So what could be using the  
> > > > > > remaining 50GB?
> > > > > > 
> > > > > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > > > > Thanks
> > > > > > 
> > > > > > --  
> > > > > > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this topic, visit  
> > > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > > .  
> > > > > To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > 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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > > To unsubscribe from this group and all its topics, 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/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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/1419197214304.1e105e4b%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer)  
> > [https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> You received this message because you are subscribed to a topic in the  
> Google Groups "elasticsearch" group.  
> To unsubscribe from this topic, visit  
> [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> To unsubscribe from this group and all its topics, 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/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .
> 
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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:** [December 21, 2014, 10:39pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/8 "2014-12-21T22:39:04Z")

</div>

Woops, got my threads crossed there 😉

On 21 December 2014 at 22:00, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:

> Hi Mark,
> 
> I really appreciate the advice and sorry I missed the earlier suggestion  
> on heap.
> 
> We are running 1.4.0 and Oracle:
> 
> java version "1.7.0\_55"
> 
> Java(TM) SE Runtime Environment (build 1.7.0\_55-b13)
> 
> Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
> 
> We have installed Marvel on the cluster and on the original message I  
> posted a screen shot from the dashboard.
> 
> Thanks
> 
> On Sun, Dec 21, 2014 at 4:45 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com) wrote:
> 
> > My original response has a suggestion on heap setting.
> > 
> > Are you using Oracle or OpenJDK? The former has better performance so it  
> > might be worth changing if you're not using it. What version of ES are you  
> > using?  
> > Given this is dev, I'd suggest you also install the Marvel plugin to give  
> > you some insights into what is happening.
> > 
> > On 21 December 2014 at 21:26, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > 
> > > Larger documents maybe 1-2k a piece. We do aggregations/facets with some  
> > > search.
> > > 
> > > What heap should we have on a node with 60gb of memory?. Right now we  
> > > get an occasional out of memory and long GCs.
> > > 
> > > —  
> > > Thanks
> > > 
> > > On Sun, Dec 21, 2014 at 3:47 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com)  
> > > wrote:
> > > 
> > > > That's way too many shards, you only really need 1 shard per node,  
> > > > unless you're expecting to dramatically increase your node count in the  
> > > > near future.
> > > > 
> > > > More info on what data it is would be useful; are the docs large,  
> > > > numerous, are you using relationships as I mentioned?  
> > > > What about your querying? Lots of aggregations/facets?
> > > > 
> > > > And as I mentioned, you lose performance by having a 32GB heap, I'd  
> > > > strongly recommonend you reduce it.
> > > > 
> > > > On 21 December 2014 at 20:04, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > > 
> > > > > So each node has 60gb of memory and heap is set to 32gb.
> > > > > 
> > > > > This is Medical data, we do lots of aggregations but no parent child  
> > > > > relationships. We currently have 36 shards for the index.
> > > > > 
> > > > > —  
> > > > > Thanks
> > > > > 
> > > > > On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom [markwalkom@gmail.com](mailto:markwalkom@gmail.com)  
> > > > > wrote:
> > > > > 
> > > > > > You should reduce your heap to half your system RAM, ie 30GB, so  
> > > > > > it's not more than 31GB. Above that your java pointers aren't compressed  
> > > > > > and you get less efficient heap use.
> > > > > > 
> > > > > > What sort of data is it, how many shards in your index, are your  
> > > > > > queries heavy (ie lots of aggs), are you using parent+child relationships?
> > > > > > 
> > > > > > On 21 December 2014 at 16:10, Jeff Rick [jeffrick@gmail.com](mailto:jeffrick@gmail.com) wrote:
> > > > > > 
> > > > > > > Hi,
> > > > > > > 
> > > > > > > So we have a small development cluster that we are doing some sizing  
> > > > > > > tests with. The make-up of the cluster as is follows:
> > > > > > > 
> > > > > > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) - 32GB  
> > > > > > > per node for heap  
> > > > > > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge)
> > > > > > > 
> > > > > > > - 32GB per node for heap
> > > > > > > 
> > > > > > > We have around 280GB of data and 250M documents in a single index.  
> > > > > > > This index is a readonly index, we do no indexing. My question is what is  
> > > > > > > using the heap?
> > > > > > > 
> > > > > > > I am showing 82GB of heap used of 155GB total. The Field Data Cache  
> > > > > > > is using 16GB and the Filter Cache is using 12 GB with another 1GB being  
> > > > > > > used by Lucene. Query Cache on the data nodes is next to nothing and on  
> > > > > > > the query node it is a less than a GB. So what could be using the  
> > > > > > > remaining 50GB?
> > > > > > > 
> > > > > > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > > > > > Thanks
> > > > > > > 
> > > > > > > --  
> > > > > > > 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/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > > .  
> > > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > 
> > > > > > --  
> > > > > > You received this message because you are subscribed to a topic in  
> > > > > > the Google Groups "elasticsearch" group.  
> > > > > > To unsubscribe from this topic, visit  
> > > > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > > > .  
> > > > > > To unsubscribe from this group and all its topics, 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/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > 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/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > You received this message because you are subscribed to a topic in the  
> > > > Google Groups "elasticsearch" group.  
> > > > To unsubscribe from this topic, visit  
> > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > .  
> > > > To unsubscribe from this group and all its topics, 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/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > 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/1419197214304.1e105e4b%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer)  
> > > [https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > .  
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > You received this message because you are subscribed to a topic in the  
> > Google Groups "elasticsearch" group.  
> > To unsubscribe from this topic, visit  
> > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > To unsubscribe from this group and all its topics, 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/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .
> > 
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> 
> --  
> 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/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com)  
> [https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> .  
> For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/CAEYi1X\_4bsLzk3ySBxxWuzi\_x9zbo4FAbrBsaX8UnL69rhck1A%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_4bsLzk3ySBxxWuzi_x9zbo4FAbrBsaX8UnL69rhck1A%40mail.gmail.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![Jeff\_Rick](https://avatars.discourse-cdn.com/v4/letter/j/e9c0ed/32.png) [@Jeff\_Rick](https://discuss.elastic.co/u/Jeff_Rick)\
**Post date:** [December 22, 2014, 6:22pm UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/9 "2014-12-22T18:22:31Z")

</div>

So this is all good but I guess I am still trying to figure out what is  
taking the heap space other than Field Data Cache and Filter Cache. Does  
anyone know the answer to that?

Thanks

On Sunday, December 21, 2014 5:39:32 PM UTC-5, Mark Walkom wrote:

> Woops, got my threads crossed there 😉
> 
> On 21 December 2014 at 22:00, Jeff Rick \<[jeff...@gmail.com](mailto:jeff...@gmail.com) \<javascript:\>\>  
> wrote:
> 
> > Hi Mark,
> > 
> > I really appreciate the advice and sorry I missed the earlier suggestion  
> > on heap.
> > 
> > We are running 1.4.0 and Oracle:
> > 
> > java version "1.7.0\_55"
> > 
> > Java(TM) SE Runtime Environment (build 1.7.0\_55-b13)
> > 
> > Java HotSpot(TM) 64-Bit Server VM (build 24.55-b03, mixed mode)
> > 
> > We have installed Marvel on the cluster and on the original message I  
> > posted a screen shot from the dashboard.
> > 
> > Thanks
> > 
> > On Sun, Dec 21, 2014 at 4:45 PM, Mark Walkom \<[markw...@gmail.com](mailto:markw...@gmail.com)  
> > \<javascript:\>\> wrote:
> > 
> > > My original response has a suggestion on heap setting.
> > > 
> > > Are you using Oracle or OpenJDK? The former has better performance so it  
> > > might be worth changing if you're not using it. What version of ES are you  
> > > using?  
> > > Given this is dev, I'd suggest you also install the Marvel plugin to  
> > > give you some insights into what is happening.
> > > 
> > > On 21 December 2014 at 21:26, Jeff Rick \<[jeff...@gmail.com](mailto:jeff...@gmail.com) \<javascript:\>
> > > 
> > > > wrote:
> > > 
> > > > Larger documents maybe 1-2k a piece. We do aggregations/facets with  
> > > > some search.
> > > > 
> > > > What heap should we have on a node with 60gb of memory?. Right now we  
> > > > get an occasional out of memory and long GCs.
> > > > 
> > > > —  
> > > > Thanks
> > > > 
> > > > On Sun, Dec 21, 2014 at 3:47 PM, Mark Walkom \<[markw...@gmail.com](mailto:markw...@gmail.com)  
> > > > \<javascript:\>\> wrote:
> > > > 
> > > > > That's way too many shards, you only really need 1 shard per node,  
> > > > > unless you're expecting to dramatically increase your node count in the  
> > > > > near future.
> > > > > 
> > > > > More info on what data it is would be useful; are the docs large,  
> > > > > numerous, are you using relationships as I mentioned?  
> > > > > What about your querying? Lots of aggregations/facets?
> > > > > 
> > > > > And as I mentioned, you lose performance by having a 32GB heap, I'd  
> > > > > strongly recommonend you reduce it.
> > > > > 
> > > > > On 21 December 2014 at 20:04, Jeff Rick \<[jeff...@gmail.com](mailto:jeff...@gmail.com)  
> > > > > \<javascript:\>\> wrote:
> > > > > 
> > > > > > So each node has 60gb of memory and heap is set to 32gb.
> > > > > > 
> > > > > > This is Medical data, we do lots of aggregations but no parent child  
> > > > > > relationships. We currently have 36 shards for the index.
> > > > > > 
> > > > > > —  
> > > > > > Thanks
> > > > > > 
> > > > > > On Sun, Dec 21, 2014 at 2:53 PM, Mark Walkom \<[markw...@gmail.com](mailto:markw...@gmail.com)  
> > > > > > \<javascript:\>\> wrote:
> > > > > > 
> > > > > > > You should reduce your heap to half your system RAM, ie 30GB, so  
> > > > > > > it's not more than 31GB. Above that your java pointers aren't compressed  
> > > > > > > and you get less efficient heap use.
> > > > > > > 
> > > > > > > What sort of data is it, how many shards in your index, are your  
> > > > > > > queries heavy (ie lots of aggs), are you using parent+child relationships?
> > > > > > > 
> > > > > > > On 21 December 2014 at 16:10, Jeff Rick \<[jeff...@gmail.com](mailto:jeff...@gmail.com)  
> > > > > > > \<javascript:\>\> wrote:
> > > > > > > 
> > > > > > > > Hi,
> > > > > > > > 
> > > > > > > > So we have a small development cluster that we are doing some  
> > > > > > > > sizing tests with. The make-up of the cluster as is follows:
> > > > > > > > 
> > > > > > > > 4 Data Nodes - 60GB of memory and 108 cores (aka c3.8xlarge) -  
> > > > > > > > 32GB per node for heap  
> > > > > > > > 1 Query / Master Node - 61GB memory and 26 cores (aka r3.2xlarge)
> > > > > > > > 
> > > > > > > > - 32GB per node for heap
> > > > > > > > 
> > > > > > > > We have around 280GB of data and 250M documents in a single index.  
> > > > > > > > This index is a readonly index, we do no indexing. My question is what is  
> > > > > > > > using the heap?
> > > > > > > > 
> > > > > > > > I am showing 82GB of heap used of 155GB total. The Field Data  
> > > > > > > > Cache is using 16GB and the Filter Cache is using 12 GB with another 1GB  
> > > > > > > > being used by Lucene. Query Cache on the data nodes is next to nothing and  
> > > > > > > > on the query node it is a less than a GB. So what could be using the  
> > > > > > > > remaining 50GB?
> > > > > > > > 
> > > > > > > > [https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png](https://lh4.googleusercontent.com/-lplj7QDAwGs/VJbw2zLiPqI/AAAAAAAAAKE/gJ4lVlOxUEs/s1600/Screen%2BShot%2B2014-12-21%2Bat%2B10.52.50%2BAM.png)  
> > > > > > > > Thanks
> > > > > > > > 
> > > > > > > > --  
> > > > > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > > > > To view this discussion on the web visit  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com)  
> > > > > > > > [https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/d82d323e-27e2-4a44-8c56-c5864b0cf7f9%40googlegroups.com?utm_medium=email&utm_source=footer)  
> > > > > > > > .  
> > > > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > > 
> > > > > > > --  
> > > > > > > You received this message because you are subscribed to a topic in  
> > > > > > > the Google Groups "elasticsearch" group.  
> > > > > > > To unsubscribe from this topic, visit  
> > > > > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > > > > .  
> > > > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > > > To view this discussion on the web visit  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com)  
> > > > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X\_6\_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X_6_iJ8dRmdrvx1gPDTJDDzDPb0xPsEzKCGs1psmB5-hg%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > > > .  
> > > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > > 
> > > > > > --  
> > > > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > > To view this discussion on the web visit  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer)  
> > > > > > [https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419192277058.7d049799%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > > > > .  
> > > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > > 
> > > > > --  
> > > > > You received this message because you are subscribed to a topic in the  
> > > > > Google Groups "elasticsearch" group.  
> > > > > To unsubscribe from this topic, visit  
> > > > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe)  
> > > > > .  
> > > > > To unsubscribe from this group and all its topics, send an email to  
> > > > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > > To view this discussion on the web visit  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com)  
> > > > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6\_41Pom1MwS0VgZtVw%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X9pX8MR3REZMZ5dvw%2BPC%2B2-Jxes6_41Pom1MwS0VgZtVw%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > > > .  
> > > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > > 
> > > > --  
> > > > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > > To view this discussion on the web visit  
> > > > [https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer)  
> > > > [https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/1419197214304.1e105e4b%40Nodemailer?utm_medium=email&utm_source=footer)  
> > > > .  
> > > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > > 
> > > --  
> > > You received this message because you are subscribed to a topic in the  
> > > Google Groups "elasticsearch" group.  
> > > To unsubscribe from this topic, visit  
> > > [https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe](https://groups.google.com/d/topic/elasticsearch/6HriDQmIikI/unsubscribe).  
> > > To unsubscribe from this group and all its topics, send an email to  
> > > [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > > To view this discussion on the web visit  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com)  
> > > [https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAEYi1X8HQsW6urVN-q38LqitikT1pQn2XNnaqJeaVo5ougJPhA%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > > .
> > > 
> > > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).
> > 
> > --  
> > 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 [elasticsearc...@googlegroups.com](mailto:elasticsearc...@googlegroups.com) \<javascript:\>.  
> > To view this discussion on the web visit  
> > [https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com](https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com)  
> > [https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com?utm\_medium=email&utm\_source=footer](https://groups.google.com/d/msgid/elasticsearch/CAFrVpUFA5HMFr0Zmj0H9wN3WUfOpbn4Fr4KGs889psnAeVQ%3DvQ%40mail.gmail.com?utm_medium=email&utm_source=footer)  
> > .  
> > For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
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/86317681-ecdb-4d39-9d1b-a3f65b313c44%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/86317681-ecdb-4d39-9d1b-a3f65b313c44%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<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 6, 2017, 12:42am UTC](https://discuss.elastic.co/t/what-is-using-all-my-heap-space/21344/10 "2017-07-06T00:42:17Z")

</div>


