JDK-7011379 : G1: overly long concurrent marking cycles
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: hs20
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2011-01-10
  • Updated: 2013-09-18
  • Resolved: 2011-04-23
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.
JDK 6 JDK 7 Other
6u25Fixed 7Fixed hs20Fixed
Description
While running jbb2005 with G1 on a 16-core UltraSPARC IV+ I noticed that marking cycles would start but never complete. This will cause Full GCs and poor scores.

The reason that is causing this is that the concurrent marking threads cannot keep up by the rate the mutator threads generate SATB buffers and are overwhelmed.

It would be nice to reduce the number of SATB buffers generated by the mutator threads.

Comments
EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-rt/hotspot/rev/7e37af9d69ef
21-01-2011

SUGGESTED FIX The fix is to introduce a pre-enqueueing step for SATB buffers. The thread that is about to enqueue the buffer it actually iterates over it and filters out entries that are not of intrest to the marking threads (entries that point to already marked objects, entries that point to objects that have been allocated since the marking started, etc.). When a marking thread processes a buffer it skips such entries and processes the rest. What this filtering does is to get rid of most entries that the marking threads will ignore in order to cut down on the number of SATB buffers that are enqueued. At the end of the filtering operation the buffer is re-used if enough entries have been removed, or enqueued if the buffer is still reasonably full (the G1SATBBufferEnqueueingThresholdPercent parameter determines the threshold).
19-01-2011

WORK AROUND [snip]
19-01-2011

EVALUATION http://hg.openjdk.java.net/jdk7/hotspot-gc/hotspot/rev/7e37af9d69ef
19-01-2011