HeadlinesBriefing favicon HeadlinesBriefing.com

JDK 27 GC Changes: G1 Default, Parallel Fixes

Hacker News •
×

Open JDK 27 includes around 350 changes for stop-the-world collectors. About half are refactorings (e.g., using Atomic<T>, G1 state machine cleanups), 35% are bug fixes, and the remainder are new features. Infrastructure work for JEP 401 (Value Objects) is included.

The most impactful change is JEP 523: G1 is now the default garbage collector in all environments, replacing Serial GC in cases where it was previously default. G1's throughput, footprint, and latency profile have improved enough to justify the switch. Users can still select Serial GC with -XX:+UseSerialGC if needed. Other G1 changes include disabling heap resizing after Full GC based on Min/Max Heap Free Ratio defaults (set to 0 and 100% via JDK-8238686) to avoid conflicting heuristics, and improved adaptive start of concurrent marking.

Parallel GC fixed a long-standing issue where the adaptive tenuring threshold could only increase, never decrease. With JDK-8380590, the threshold can now decrease, promoting longer-lived objects sooner and preserving younger objects. Parallel GC also correctly expands the heap under repeated large allocations (JDK-8377561). Serial GC has no notable changes other than losing default status. Across all collectors, TLAB sizing now avoids oversizing for many short-lived threads (JDK-8381834), and string deduplication logging has improved.

Future focus remains on automatic heap sizing and smarter memory management for G1.