# Continuous garbage collection

**URL:** <https://discuss.elastic.co/t/continuous-garbage-collection/80403>\
**Category:** Elasticsearch\
**Created:** [March 29, 2017, 4:34am UTC](https://discuss.elastic.co/t/continuous-garbage-collection/80403 "2017-03-29T04:34:41Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![hmoffatt](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@hmoffatt](https://discuss.elastic.co/u/hmoffatt)\
**Post date:** [March 29, 2017, 4:34am UTC](https://discuss.elastic.co/t/continuous-garbage-collection/80403/1 "2017-03-29T04:34:41Z")

</div>

I'm regularly getting my Elasticsearch instance go into continuous garbage collection with log entries like these every 3 seconds:

[2017-03-29T15:23:29,060][WARN][o.e.m.j.JvmGcMonitorService] [3BURiFV] [gc][110] overhead, spent [1.8s] collecting in the last [1.8s]

It uses a lot of CPU and becomes unresponsive when this happens. There is just a single node.

I am only trying to store some Logstash and Metricbeat data from a few hosts - I don't think this would be considered a large amount of data, though perhaps it is. The /\_stats says total data is 22Gb.

I am running the JVM (32-bit) with -Xms1g -Xmx1g.

Is this simply not enough memory? What should I do?

thanks

Hamish

---

<div class="post-metadata">

**Author:** ![Christian\_Dahlqvist](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/christian_dahlqvist/32/4617_2.png) [@Christian\_Dahlqvist](https://discuss.elastic.co/u/Christian_Dahlqvist)\
**Post date:** [March 29, 2017, 5:12am UTC](https://discuss.elastic.co/t/continuous-garbage-collection/80403/2 "2017-03-29T05:12:38Z")

</div>

1GB is a very small heap. Based on your description it sounds like you need a box with more RAM and heap.

---

<div class="post-metadata">

**Author:** ![hmoffatt](https://avatars.discourse-cdn.com/v4/letter/h/c57346/32.png) [@hmoffatt](https://discuss.elastic.co/u/hmoffatt)\
**Post date:** [March 29, 2017, 5:22am UTC](https://discuss.elastic.co/t/continuous-garbage-collection/80403/3 "2017-03-29T05:22:44Z")

</div>

I don't mind if queries are slow, as I'm stashing a lot of log data but rarely accessing it.

I've deleted some old data and closed some old indices and it's running again for now.

---

<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:** [April 26, 2017, 5:22am UTC](https://discuss.elastic.co/t/continuous-garbage-collection/80403/4 "2017-04-26T05:22:50Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
