JDK 20 G1/Parallel/Serial GC changes

submited by
Style Pass
2023-03-17 13:30:05

Yet another JDK release that is on track - JDK 20 GA is almost here. Another opportunity to summarize changes and improvements in Hotspot´s stop-the-world garbage collectors for the JDK 20 release.

This release does not contain any JEP for the garbage collection area, but the JEP for Generational ZGC reached Candidate status just recently, so maybe it will be ready for JDK 21. :)

Other than that, the full list of changes for the entire Hotspot GC subcomponent for JDK 20 is here, showing around 220 changes in total being resolved or closed.

The only notable improvement to Parallel GC is parallelization of the handling of objects that cross compaction regions JDK-8292296 during Full GC.

Instead of having a single-threaded phase at the end that iterates and fixes up these objects, worker threads collect objects crossing their local compaction regions and handle them on their own. M. Gasson, the contributor, reports 20% reduction of full gc pause times in select cases.

JDK-8210708 reduces G1 native memory footprint by ~1.5% of Java heap size by removing one of the mark bitmaps spanning the entire Java heap. The Concurrent Marking in G1 blog post includes a thorough discussion of the change.

Leave a Comment