# Logstash high load and CPU usage

**URL:** <https://discuss.elastic.co/t/logstash-high-load-and-cpu-usage/357079>\
**Category:** Logstash\
**Created:** [April 9, 2024, 2:07pm UTC](https://discuss.elastic.co/t/logstash-high-load-and-cpu-usage/357079 "2024-04-09T14:07:51Z")\
**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 9, 2024, 3:49pm UTC](https://discuss.elastic.co/t/logstash-high-load-and-cpu-usage/357079/4 "2024-04-09T15:49:03Z")

</div>

The screenshot suggests the JVM heap is continuously growing, and the CPU and system load are growing along with it. It looks like the heap only shrinks significantly when the JVM is restarted (leading to the brief gaps in the monitoring data).

That suggests a GC issue. I would enable GC logging (how to do that depends on the JVM, its version and the options you are using). That will show you the time spent on GC. Then get a heap dump and take a look at what is using up the heap. See [this](https://discuss.elastic.co/t/heapdumponoutofmemoryerror/298786/2) thread.

---

_[View the full topic](https://discuss.elastic.co/t/logstash-high-load-and-cpu-usage/357079)._
