JEP draft: Improve G1 worst-case latencies by making the full GC parallel

OwnerStefan Johansson
Created2017/01/17 11:40
Updated2017/04/12 14:21
TypeFeature
StatusSubmitted
Componenthotspot / gc
ScopeImplementation
Discussion hotspot dash gc dash dev at openjdk dot java dot net
EffortM
DurationM
Priority3
Reviewed byMikael Vidstedt
Issue8172890

Summary

Improve G1 worst-case latencies by making the full GC parallel.

Non-Goals

Motivation

The G1 garbage collector was made the default in JDK 9. The previous default, the Parallel collector, has a parallel full GC and 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 is using a single threaded version mark-sweep-compact algorithm. The idea is to parallelize the mark-sweep-compact algorithm and scale the number of threads used with regards to heap layout and size.

Testing

Risks and Assumptions