JEP 490: ZGC: Remove the Non-Generational Mode
🧠 JEP 490: ZGC – Remove the Non-Generational Mode
🔍 What is ZGC?
ZGC (Z Garbage Collector) is a low-latency, concurrent, and scalable garbage collector introduced in JDK 11.
It was originally non-generational — treating all objects the same regardless of age.
🆕 What Does JEP 490 Do?
It removes the old non-generational mode of ZGC and makes the generational mode the only option.
✅ Now, ZGC is always generational.
🎯 Why Remove the Non-Generational Mode?
Treated all objects equally
Separates young vs old objects
More CPU/memory overhead
Faster minor collections
Less predictable performance
Lower pause times, better throughput
🧪 Key Benefit in Practice:
Generational GC improves performance by:
Focusing frequent collections on short-lived (young) objects.
Delaying collection of long-lived (old) objects, which change less often.
This reduces the cost of GC and improves overall application responsiveness.
📅 Timeline:
JDK 11–20
Non-generational (default)
JDK 21
Generational (preview)
JDK 22+
Generational becomes default
🔥 JDK 24
Non-generational is removed (JEP 490)
🧰 Impact for Developers
✅ No config needed to enable generational ZGC — it's default.
🧹 The option
-XX:+ZGenerationalis no longer required.❌ The old non-generational ZGC is no longer available.
Last updated