# G1 Garbage Collector with Elasticsearch \>= 1.1

**URL:** https://discuss.elastic.co/t/g1-garbage-collector-with-elasticsearch-1-1/18291
**Category:** Elasticsearch
**Created:** [June 24, 2014, 12:57pm UTC](https://discuss.elastic.co/t/g1-garbage-collector-with-elasticsearch-1-1/18291 "2014-06-24T12:57:16Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Michael\_Hart](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/michael_hart/32/65937_2.png) [@Michael\_Hart](https://discuss.elastic.co/u/Michael_Hart)
#### Post date: [June 24, 2014, 12:57pm UTC](https://discuss.elastic.co/t/g1-garbage-collector-with-elasticsearch-1-1/18291/1 "2014-06-24T12:57:16Z")

</div>

I'm running into a lot of issues with large heaps of \>= 8GB and full GC's,  
as are a lot of others on this forum. Everything from Oracle/Sun indicates  
that the G1 garbage collector is supposed to deal with large heaps better,  
or at least give more consistency in terms of GC pauses, than the CMS  
garbage collector. Earlier posts in this forum indicate that there were  
bugs with the G1 collector and Trove, that have now been fixed.

Is there updated information and/or recommendations from Elasticsearch  
about using the G1 collector with Java 7u55 and Elasticsearch 1.1 or 1.2?

thanks  
mike

--  
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/64d8d7fb-411f-44b0-9c51-fd6374965837%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/64d8d7fb-411f-44b0-9c51-fd6374965837%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

### Author: ![Bruce\_Ritchie](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/bruce_ritchie/32/9370_2.png) [@Bruce\_Ritchie](https://discuss.elastic.co/u/Bruce_Ritchie)
#### Post date: [June 24, 2014, 1:38pm UTC](https://discuss.elastic.co/t/g1-garbage-collector-with-elasticsearch-1-1/18291/2 "2014-06-24T13:38:12Z")

</div>

We use G1GC for tomcat and mule in production but not for ES. We have found  
that G1GC is more 'stable' in terms of pause times at the cost of more  
overhead and thus less throughput. No GC algorithm will help you though if  
you have a memory leak or your vm is under extreme memory pressure.

For really large heaps I would suggest taking a look at Azul's vm. It's not  
cheap but it pretty much guarantees no pause times any heap size. I don't  
know at what overhead cost though.

Bruce

--  
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/19f488c4-5493-4bfa-83ea-aad7ce05fe3a%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/19f488c4-5493-4bfa-83ea-aad7ce05fe3a%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, 1:20am UTC](https://discuss.elastic.co/t/g1-garbage-collector-with-elasticsearch-1-1/18291/3 "2017-07-06T01:20:10Z")

</div>


