ZGC has been in development for more or less a decade now. This talk will explore the current state of ZGC in JDK 25 and look at how the performance have improved over the years.
Size: 1.7 MB
Language: en
Added: Oct 22, 2025
Slides: 22 pages
Slide Content
A ScyllaDB Community
ZGC: JDK 25
Performance Update
Stefan Johansson
OpenJDK GC Engineer
A quick look at ZGC
The goals of ZGC
Low latency
Pause times below 1 ms
Scalability
Handle TB sized heaps
Auto-tuning
Minimal configuration required
ZGC Milestones
JDK 11
Experimental feature
JDK 14
Available on Windows and
macOS
JDK 16
Concurrent stack
scanning
JDK 21
Generational mode (off by default)
enabled with –XX:+ZGenerational
JDK 12
Concurrent class
unloading
JDK 15
Production ready
JDK 17
Automatic scaling of
worker threads
JDK 25
ZGC always generational
Current status
Low latency
Pause times below 1 ms
Scalability
Handle TB sized heaps
Auto-tuning
Minimal configuration required
Current status
Low latency
•Pause only for synchronization
•Heavy work done concurrently
Scalability
Handle TB sized heaps
Auto-tuning
Minimal configuration required
Current status
Low latency
•Pause only for synchronization
•Heavy work done concurrently
Scalability
•Support 16 TB heaps
•Pauses still short
Auto-tuning
Minimal configuration required
Current status
Low latency
•Pause only for synchronization
•Heavy work done concurrently
Scalability
•Support 16 TB heaps
•Pauses still short
Auto-tuning
•Little configuration required
•Just set the heap size
Performance overview
What is good performance?
■It all depends
●Throughput
●Latency
●Footprint
■Trade-offs between those aspects
How do ZGC achieve good performance?
■Great low latency alternative
●Basically no pauses
■By doing work concurrently
●Determining liveness
●Moving live objects
●Free memory
■Keep the concurrency overhead low
Low concurrency overhead
■Return memory as soon as possible
●Avoid allocation stalls
■Keep CPU overhead at minimum barriers
●Efficient barriers
●Smart algorithms
■Colored pointers
Performance details
Pause times
Pause times
Pause times
Pause times
Pause times
Pause times
Application throughput
Application latency
Thank you! Let’s connect.
Stefan Johansson
@kstefanj
kstefanj.github.io