# Excessive garbage collection

**URL:** <https://discuss.elastic.co/t/excessive-garbage-collection/127527>\
**Category:** Elasticsearch\
**Created:** [April 10, 2018, 5:53pm UTC](https://discuss.elastic.co/t/excessive-garbage-collection/127527 "2018-04-10T17:53:00Z")\
**Posts on this page:** 1\
**Showing post:** 4

<div class="post-metadata">

**Author:** ![Badger](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/badger/32/25190_2.png) [@Badger](https://discuss.elastic.co/u/Badger)\
**Post date:** [April 10, 2018, 7:55pm UTC](https://discuss.elastic.co/t/excessive-garbage-collection/127527/4 "2018-04-10T19:55:17Z")

</div>

That's OK, that is not the issue. Something is deliberately setting MaxNewSize low. With a 6 GB heap then I see this in my gc.log ... -XX:MaxNewSize=174485504. That seems crazy low to me but it wasn't put there by the JVM option fairy, so there must be a reason.

If I add -XX:MaxNewSize=2147483648 to my jvm.options then it is respected. I still get terrible performance from ParNew, just a lot less frequently.

Personally I run logstash using the G1 garbage collector, but I believe that is unsupported by Elastic.

---

_[View the full topic](https://discuss.elastic.co/t/excessive-garbage-collection/127527)._
