# Is Garbage Collection monitoring still needed in ES 6.8

**URL:** <https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582>\
**Category:** Elasticsearch\
**Tags:** elastic-stack-monitoring\
**Created:** [April 23, 2023, 3:42pm UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582 "2023-04-23T15:42:14Z")\
**Posts on this page:** 8\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveen\_Banthia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_banthia/32/120100_2.png) [@Praveen\_Banthia](https://discuss.elastic.co/u/Praveen_Banthia)\
**Post date:** [April 23, 2023, 3:42pm UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/1 "2023-04-23T15:42:15Z")

</div>

I was reading an old article

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

We are on ES version 6.8 and Java 11 or higher . Is this checking for garbage collection metrics even needed anymore.

My assumption  
G1 GC is fast enough that even with max recommended size (~32 GB) of heap you are never going to have a 30 sec stop the world garbage collection .

Please correct me if I am wrong since I am doing a Elastic search 101 presentation and do not want obsolete things to be presented.

---

<div class="post-metadata">

**Author:** ![leandrojmp](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/leandrojmp/32/107231_2.png) [@leandrojmp](https://discuss.elastic.co/u/leandrojmp)\
**Post date:** [April 23, 2023, 3:53pm UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/2 "2023-04-23T15:53:09Z")

</div>

> [@Praveen\_Banthia](#):
>
> Is this checking for garbage collection metrics even needed anymore.

What checking are you talking about?

If you mean the check related to compressed oop, then yes, it is still recommended to have the HEAP below this threshold.

> [@Praveen\_Banthia](#):
>
> Please correct me if I am wrong since I am doing a Elastic search 101 presentation and do not want obsolete things to be presented.

You said you are on version 6.8, is your presentation based on this version? If so it is already obsolete, 6.8 is not supported or maintained anymore and a lot of things changed from 6.X to 7.X and from 7.X to 8.X.

---

<div class="post-metadata">

**Author:** ![Praveen\_Banthia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_banthia/32/120100_2.png) [@Praveen\_Banthia](https://discuss.elastic.co/u/Praveen_Banthia)\
**Post date:** [April 23, 2023, 4:47pm UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/3 "2023-04-23T16:47:57Z")

</div>

I am aware that 6.8 is obsolete but that is what we have installed . There is active work to move to 7.X but that is in pipeline.I am from OPS team and bringing others in team upto speed on current setup.

I was more curious about the fact that the article mentioned having too large of jvm heap for cluster might cause GC `stop the world` situations which might go larger than 30 sec causing ES to believe the node is down .

With new G1 GC implemented and if I have nodes with 64 GB ram can I just set JVM ~ 32 GB always (under threshold on compressed OOPS) and not worry about fine tuning JVM based on usage or concerns of Garbage collection so long that ES thinks node is dead ?

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 23, 2023, 10:34pm UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/4 "2023-04-23T22:34:48Z")

</div>

Welcome to our community! 😃

What sort of fine tuning are you looking at doing and why?

---

<div class="post-metadata">

**Author:** ![Praveen\_Banthia](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/praveen_banthia/32/120100_2.png) [@Praveen\_Banthia](https://discuss.elastic.co/u/Praveen_Banthia)\
**Post date:** [April 24, 2023, 12:39am UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/5 "2023-04-24T00:39:01Z")

</div>

Not doing any finetuning yet. New to Elasticsearch and my team. Putting up a presentation for spreading knowledge on what performance metrics we should monitor .

Was curious if JVM Heap Usage metric is useful to monitor for ES 6.8 forward which has G1 GC .  
If I understand right G1 GC is fast enough that even with max size heap (32 GB) we do not really need to be concerned with timeout during `stop the world` GC of the heap.

Please correct me if I am wrong.

---

<div class="post-metadata">

**Author:** ![stephenb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/stephenb/32/40856_2.png) [@stephenb](https://discuss.elastic.co/u/stephenb)\
**Post date:** [April 24, 2023, 2:50am UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/6 "2023-04-24T02:50:32Z")

</div>

It is never a bad idea to monitor GC in my opinion.

If you don't want to, don't.

There's a reason that that the native elastic stack monitoring does monitor JVM usage and GC. It is meaningful.

---

<div class="post-metadata">

**Author:** ![warkolm](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/warkolm/32/39224_2.png) [@warkolm](https://discuss.elastic.co/u/warkolm)\
**Post date:** [April 24, 2023, 5:16am UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/7 "2023-04-24T05:16:18Z")

</div>

> [@Praveen\_Banthia](#):
>
> If I understand right G1 GC is fast enough that even with max size heap (32 GB) we do not really need to be concerned with timeout during `stop the world` GC of the heap.

It's _better_ than CMS yes, but you can still get stop-the-world pauses.

TLDR - yes. Monitor it.

---

<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:** [May 22, 2023, 5:16am UTC](https://discuss.elastic.co/t/is-garbage-collection-monitoring-still-needed-in-es-6-8/330582/8 "2023-05-22T05:16:30Z")

</div>

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