r/java • • Feb 24 '26

Dissecting the CPU-Memory Relationship in Garbage Collection

https://norlinder.nu/posts/GC-Cost-CPU-vs-Memory/
52 Upvotes

5 comments sorted by

View all comments

Show parent comment

1

u/BinaryRage Feb 25 '26

I’ve been looking for a solution for this since switching to ZGC by default and noticed the new accounting. Looking forward to adding a correct GC overhead metric with JDK 26!

2

u/Jonas_Norlinder Feb 25 '26

Glad to hear it will be useful. Switching to a concurrent collector like ZGC definitely highlights the disconnect between pause times and actual CPU overhead. The underlying goal of the API was to finally give the ecosystem, from production monitoring to performance benchmarking, a unified, sound metric across all collectors. Hope the new accounting works well in your metrics pipeline!