JDK-8165443 : Free Collection Set serial phase takes very long on large heaps
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-09-05
  • Updated: 2019-02-11
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.
Related Reports
Relates :  
Relates :  
Even after fixing JDK-8165313, a significant amount of time is spent in the Free Collection Set Serial part of the GC.

E.g. with -Xmx20g -Xms20g -XX:NewSizePercent=65 -XX:MaxNewSizePercent=80 -XX:G1RegionSize=1m on gcbasher, time spent in that phase is still in the range of 20ms (instead of >100ms) with ~14k regions.

Running with analyzer enabled, the work distribution is kind of this (accumulated times of a single run in ms):

  G1SerialFreeCollectionSetClosure::doHeapRegion: 107
    G1CollectedHeap::free_region  38
    TruncatedSeq::add(double) 18
    SurvRateGroup::record_surviving_words 9
    G1COntiguousSpace::used 2

(I kind of think that the TruncatedSeq::add() measurements were part of SurvRateGroup::record_surviving_words(), but somehow did not get attributed correctly)
I think we could do at least some of this work concurrently.