JDK-8238687 : Investigate memory uncommit during young collections in G1
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 15
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-02-07
  • Updated: 2021-07-26
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
Blocks :  
Blocks :  
Blocks :  
Blocks :  
Relates :  
Description
Currently G1 uncommits memory in the Remark pause only. It may be better to uncommit at other places (see JDK-8238686) when heap usage is actually low.

Similar to expansion, G1 could regularly check whether the GCTimeRatio is low enough (e.g. < 1/2 GCTimeRatio) to warrant heap shrinking.

Note that the amount of uncommit should be so that heap resizing activity during further operation is minimal.
Comments
Before we can fix this, gc time ratio tracking must be fairly correct, i.e. properly track actual gc time ratio (JDK-8243672) and try to avoid unnecessary gc time ratio spikes (JDK-8244603)
15-05-2020