JDK-8159697 : Adaptive G1HeapWastePercent, G1MixedGCLiveThresholdPercent, G1OldCSetRegionThresholdPercent, and G1MixedGCLiveThresholdPercent and G1MixedGCCountTarget
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 9
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2016-06-16
  • Updated: 2020-09-17
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
Duplicate :  
Relates :  
Relates :  
Description
Currently the flags

  G1HeapWastePercent
  G1MixedGCLiveThresholdPercent
  G1OldCSetRegionThresholdPercent
  G1MixedGCLiveThresholdPercent and
  G1MixedGCCountTarget

determine the length of the mixed gc phase and the candidate selection.

Try to make them more adaptive in the sense of
  - if we can't reclaim more than we promote for some time, either adjust settings (increase pause time goal, increase minimum number of old regions to get) or give up
  - if we are close to going out of heap, increase the candidate set, and relax the requirements
  - if there is enough time (e.g. gc overhead), clean out more (or slower)

Of course, the inverse of these conditions (if applicable) is true as well
Comments
- if the G1OldCSetRegionThresholdPercent is low, which means that we only reclaim regions with low occupany (i.e. quick to reclaim), one could decrease G1HeapWastePercent, as G1OldCSetRegionThresholdPercent already removed all expensive regions from the candidate set.
16-06-2016

Some problems found: - almost out of heap and since g1heapwastepercent is reached (and set to a high value, like 15%), g1 stops evacuating - almost out of heap and since G1OldCSetRegionThresholdPercent is low, we stop evacuating - doing a series of mixed gcs where the amount of old gen occupancy is higher than before because G1OldCSetRegionThresholdPercent is too low, but we are still above G1HeapWastePercent - we already cleared out a large part of the heap, but G1HeapWastePercent has not been reached yet (set too low), and we start adding very expensive old regions - G1MixedGCCountTarget forces g1 to take lots of expensive regions because G1HeapWastePercent has not been reached, but all of these evacuations cause more regions to be occupied after gc
16-06-2016