JDK-8034842 : Parallelize the Free CSet phase in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 8u20,9
  • Priority: P3
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-02-13
  • Updated: 2018-06-21
  • Resolved: 2016-07-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
9 b131Fixed
Related Reports
Blocks :  
Blocks :  
Relates :  
Relates :  
Relates :  
Relates :  
JDK-8027295 observes that the Free CSet phase of young gen GC on large heaps takes a significant amount of time.

There is a prototype that improves the serial performance by tweaking the code, and another one based on the former parallelizing parts of this phase.

This CR is a split-out of the parallelization efforts. The changes in JDK-8027295 are prerequisites for parallelization.
FC Extension Request Justification: This change fixes a huge performance problem when using G1 on large heaps. This parallelizes a particular phase of GC (previously done serially), cutting the time this phase takes from the (unacceptable) second range to millisecond range on sufficiently large machines. Required for some customer and expected for a long time from the PAE group. Note that during review I have been asked to split this change into two parts for better reviewability. The first part is JDK-8159978 (which also fixes a bug found while doing so, so I do not think I need an extension request for that one). Review thread restarted at http://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2016-June/018496.html Risk assessment: Low - while it is a significant change, it has been run many times on internal benchmarks in the last two years. Proposed due date: Aug 10 2016 (the change is out for review)

Due to slow reviewing, moving the proposed due date out for three weeks from Jul 20 to Aug 10. Only need one more reviewer to acknowledge latest style changes.

Updated patch to build at least with current jdk9/hs-rt tree

Attached patch.

The Free CSet phase can be split into a serial component that handles region list management, and a parallel component that does the heavy lifting (calculating remembered set entry count, freeing the RSets). If information about whether a region has been in the collection set or not is copied, the serial part and the parallel parts can be done in parallel again. There need to be some considerations about work set size for each part of the parallel phase: per region work may in large machines become too small to offset startup times of worker threads.