# Garbage Collection Time with ZGC

**URL:** <https://community.dynatrace.com/t/garbage-collection-time-with-zgc/56079>\
**Category:** Open Q&A\
**Tags:** garbage-collection\
**Created:** [June 2, 2026, 8:28pm UTC](https://community.dynatrace.com/t/garbage-collection-time-with-zgc/56079 "2026-06-02T20:28:51Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![AntonioSousa](https://dub1.discourse-cdn.com/dynatrace/user_avatar/community.dynatrace.com/antoniosousa/32/50_2.png) [@AntonioSousa](https://community.dynatrace.com/u/AntonioSousa)\
**Post date:** [June 2, 2026, 8:28pm UTC](https://community.dynatrace.com/t/garbage-collection-time-with-zgc/56079/1 "2026-06-02T20:28:51Z")

</div>

ZGC is the Z Garbage Collector.

It’s quite different from other Garbage Collectors, as it is always “working”.

It seems that Dynatrace is misinterpreting Garbage Collection time, and always maintaining a problem open. Working with OpenJDK 17.0.18 and OneAgent 1.335.

There are very few links to ZGC in Dynatrace ([this](https://docs.dynatrace.com/docs/whats-new/oneagent/sprint-305) and [this](https://community.dynatrace.com/post/166377)), so wondering if someone has seen this in the wild?

---

<div class="post-metadata">

**Author:** ![sujit\_k\_singh](https://avatars.discourse-cdn.com/v4/letter/s/34f0e0/32.png) [@sujit\_k\_singh](https://community.dynatrace.com/u/sujit_k_singh)\
**Post date:** [June 2, 2026, 11:10pm UTC](https://community.dynatrace.com/t/garbage-collection-time-with-zgc/56079/2 "2026-06-02T23:10:03Z")

</div>

Hi&nbsp;[@AntonioSousa](https://community.dynatrace.com/user/17213)

This was a known issue fixed in OneAgent 1.305 (OA-39185) — “Java heap and GC metrics are now reported reliably when the application uses ZGC.”&nbsp;[OneAgent release notes version 1.305 — Dynatrace Docs](https://docs.dynatrace.com/docs/whats-new/oneagent/sprint-305)

Since you’re on 1.335, the metrics should already be accurate. If the problem is still being raised, it may have baselined GC suspension time using patterns that don’t suit ZGC’s concurrent nature. This is just my assumption as i have never encountered this issue&nbsp;😀

or else support is the last option.
