Tuning Z Garbage Collector (ZGC)

ZGC is a highly scalable, low-latency collector available in JDK 11 as an experimental feature and fully supported in JDK 17 and onward. This is the only collector that is fully concurrent, meaning it does nearly all of its work concurrently with application threads. Therefore, the pause times are usually measured in microseconds. It can also scale with ease to handle tremendously large workloads, supporting heap sizes from 8 MB up to 16 TB, while maintaining maximum pause times of a few milliseconds. And, because it handles such large amounts of memory for applications that can scale unpredictably, it’s designed to return memory back to the operating system when no longer needed.

Further Reading

See “The Z Garbage Collector” in the HotSpot Virtual Machine Garbage Collection Tuning Guide for your version of the JDK:


Last reviewed on Sat Feb 01 2025 00:00:00 GMT+0000 (Coordinated Universal Time)