JDK-8053998 : Hot card cache flush chunk size too coarse grained
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2014-07-30
  • Updated: 2015-09-29
  • Resolved: 2014-09-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.
JDK 8 JDK 9
8u60Fixed 9 b34Fixed
Description
At GC time G1 needs to flush the hot card cache. This is done in parallel using a (too) simple mechanism to chunk the whole hot card cache into parts:

In detail, the chunk size is

  hot card cache chunk size = size of hot card cache / number of threads

Which is too coarse for moderately large hot card cache sizes: it happens that in some applications one thread may delay all other threads significantly because it got quite late to processing the (large) hot card cache.

The change can be tested by e.g. setting G1ConcRSLogCacheSize to 20.

The fix could be to bound the hot card cache chunk size, or even more simple fix it to some reasonable size.
Comments
The assumption is the hot card cache is full. Is it possible that the hot card cache is not full, so when deciding hot card cache chunk size, some threads get chunks full of cards, and others get empty chunks.
30-07-2014