-
JEP
-
Resolution: Delivered
-
P3
-
Stefan Johansson
-
Feature
-
Open
-
Implementation
-
-
M
-
M
-
307
Summary
Improve G1 worst-case latencies by making the full GC parallel.
Non-Goals
Match the performance of the parallel collector's full GC for all use cases.
Motivation
The G1 garbage collector was made the default in JDK 9. The previous default, the parallel collector, has a parallel full GC. To minimize the impact for users experiencing full GCs, the G1 full GC should be made parallel as well.
Description
The G1 garbage collector is designed to avoid full collections, but when the concurrent collections can't reclaim memory fast enough a fall back full GC will occur. The current implementation of the full GC for G1 uses a single threaded mark-sweep-compact algorithm. We intend to parallelize the mark-sweep-compact algorithm and use the same number of threads as the Young and Mixed collections do. The number of threads can be controlled by the -XX:ParallelGCThreads
option, but this will also affect the number of threads used for Young and Mixed collections.
Testing
Full GC time analysis to ensure that the full GC times have improved. Looking at benchmark scores will probably not be good enough since G1 is designed to avoid full GCs.
Runtime analysis using VTune or Solaris Studio Performance Analyzer to find unnecessary bottlenecks.
Risks and Assumptions
The work is based on the assumption that nothing in the fundamental design of G1 prevents a parallel full GC.
The fact that G1 uses regions will most likely lead to more wasted space after a parallel full GC than for a single threaded one.
- blocks
-
JDK-8189738 Improve G1 Full GC free regions handling
- Open
-
JDK-8189740 Improve tracking for the G1 Full GC
- Open
-
JDK-8189741 Balance the compaction phase for G1 Full GC
- Open
-
JDK-8189742 Improve G1 Full GC marking code
- Open
-
JDK-8189733 Cleanup Full GC setup and tear down
- Resolved
-
JDK-8189734 Cleanup MarkSweep when G1 dependency is gone
- Resolved
-
JDK-8189737 Make HeapRegion not derive from Space
- Resolved
-
JDK-8189735 Remove CodeCache::gc_prologue()) call in G1 Full GC
- Closed
- duplicates
-
JDK-6485083 G1: parallelize Full GCs in G1
- Closed
- relates to
-
JDK-8196071 Change G1 Full GC heap and thread sizing ergonomics
- Resolved
-
JDK-8199674 Improve G1 Full GC array marking
- Resolved
-
JDK-8190358 test/hotspot/jtreg/gc/logging/TestPrintReferences.java does not include balance queue time
- Closed
-
JDK-8049332 G1 full GC does not compact into humongous regions freed in the same collection
- Closed