JDK-8159605 : Reconsider stopping adding old collection set regions when occupancy threshold is reached
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-06-15
  • 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.
Other
tbdUnresolved
Related Reports
Relates :  
Description
In the default collector policy we stop adding old gen regions to the collection set when the waste threshold is reached.

This can cause rather short mixed gcs that do not reclaim a lot, if anything. Since getting to a safepoint can take a considerable amount of time, this looks like a waste of throughput.

Either lift this restriction, or size the young gen more appropriately to avoid wasting a lot of throughput.

E.g.

g1DefaultPolicy.cpp:351ff:
      if (reclaimable_perc <= threshold) {
        // We've added enough old regions that the amount of uncollected
        // reclaimable space is at or below the waste threshold. Stop
        // adding old regions to the CSet.
        log_debug(gc, ergo, cset)("Finish adding old regions to CSet (reclaimable percentage not over threshold). "
                                  "old %u regions, max %u regions, reclaimable: " SIZE_FORMAT "B (%1.2f%%) threshold: " UINTX_FORMAT "%%",
                                  old_region_length(), max_old_cset_length, reclaimable_bytes, reclaimable_perc, G1HeapWastePercent);
        break;
      }

Comments
" Either lift this restriction, or size the young gen more appropriately to avoid wasting a lot of throughput. " means that we could try to estimate the next old gen collection set part, and make the young gen larger. E.g. we know that in the next mixed gc we will not collect more than X old regions, so do not minimize the young gen.
16-06-2016