# Elasticsearch throwing some overhead warning in logs

**URL:** https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137
**Category:** Elasticsearch
**Created:** [February 12, 2021, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137 "2021-02-12T14:02:48Z")
**Posts on this page:** 5
**Page:** 1

<div class="post-metadata">

### Author: ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)
#### Post date: [February 12, 2021, 2:02pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137/1 "2021-02-12T14:02:48Z")

</div>

HI Team,  
we are getting below response in elasticsearch log , anyone can help me on this why im getting this kind of error on it,

> [2021-02-12T07:29:17,371][WARN][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][242917] overhead, spent [1.6s] collecting in the last [2.1s]  
> [2021-02-12T08:16:26,764][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245742] overhead, spent [531ms] collecting in the last [1.1s]  
> [2021-02-12T08:16:49,825][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245765] overhead, spent [282ms] collecting in the last [1s]  
> [2021-02-12T08:19:40,334][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245935] overhead, spent [294ms] collecting in the last [1.1s]  
> [2021-02-12T08:19:44,336][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245939] overhead, spent [274ms] collecting in the last [1s]  
> [2021-02-12T08:19:49,383][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245944] overhead, spent [254ms] collecting in the last [1s]  
> [2021-02-12T08:19:51,454][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245946] overhead, spent [307ms] collecting in the last [1s]  
> [2021-02-12T08:20:10,633][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245965] overhead, spent [264ms] collecting in the last [1s]  
> [2021-02-12T08:20:35,658][INFO][o.e.m.j.JvmGcMonitorService] [datanode1] [gc][245990] overhead, spent [258ms] collecting in the last [1s]

---

<div class="post-metadata">

### Author: ![alejandrosl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandrosl/32/83830_2.png) [@alejandrosl](https://discuss.elastic.co/u/alejandrosl)
#### Post date: [February 12, 2021, 2:50pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137/2 "2021-02-12T14:50:31Z")

</div>

This 'WARNING' not an error, indicate that maybe you have not enough memory RAM to the JVM (elasticsearch) and the Garbage collector need that time to clear the memory, thats a problem, while GC is working your JVM will not responsive.

You have to check the dimensions of the cluster (xmx xms in the jvm.conf in the elasticsearch directory)

To my a gold rule to do that are no more than 30GB of RAM for JVM and with the same amount to storage cache and 4 more to the OS, and 30 Gb of data per 1GB of RAM to the JVM process.

Another metric to keep in mind are the number of shards per node in the cluster, shards are not free.

Let me share some interesting articles that let you understand better that:

> **[A Heap of Trouble: Managing Elasticsearch's Managed Heap](https://www.elastic.co/blog/a-heap-of-trouble)**

> **[How many shards should I have in my Elasticsearch cluster?](https://www.elastic.co/blog/how-many-shards-should-i-have-in-my-elasticsearch-cluster)**
>
> If you are looking for practical guidelines around how many indices and shards to have in your cluster, this blog post will help you avoid common pitfalls.

Kind regards  
ale 🙂

---

<div class="post-metadata">

### Author: ![Ganesh2303](https://avatars.discourse-cdn.com/v4/letter/g/57b2e6/32.png) [@Ganesh2303](https://discuss.elastic.co/u/Ganesh2303)
#### Post date: [February 12, 2021, 2:55pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137/3 "2021-02-12T14:55:40Z")

</div>

Thanks for the reply @alejandrosl .

I hope this warn will not cause any issue in elasticsearch.

---

<div class="post-metadata">

### Author: ![alejandrosl](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/alejandrosl/32/83830_2.png) [@alejandrosl](https://discuss.elastic.co/u/alejandrosl)
#### Post date: [February 12, 2021, 3:01pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137/4 "2021-02-12T15:01:57Z")

</div>

You are very welcome but ...  
@Ganesh2303 the warning is not a problem but you have to check the resources of your cluster, the GC are indicate you that you need more memory (surely)

One more thing, the speed of a cluster is as fast as the slowest of its nodes

🙂

---

<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: [March 12, 2021, 3:02pm UTC](https://discuss.elastic.co/t/elasticsearch-throwing-some-overhead-warning-in-logs/264137/5 "2021-03-12T15:02:32Z")

</div>

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