JDK-8254738 : G1: Improve generation placement heuristics for regions that could not be evacuated
  • Type: Sub-task
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 16
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2020-10-14
  • Updated: 2021-11-30
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 :  
Relates :  
Relates :  
Description
In order to reduce memory usage after G1 could not clean out a whole region during evacuation because of evacuation failure or pinning, keep regions that experienced an object that could not be moved in the same generation as useful.

This could make it possible to reclaim the space in the next gc if this is in survivor.

One heuristic could be aging the objects that stay in-place (if there are lots of failed objects): the age of the region is the maximum age of the objects inside.

If there are just a few ones which is typically the case for regions with pinned objects it might be useful to always at least keep a remembered set regardless of generation to reclaim it in the next gc.

The reason is that a) either the evacuation failure free up enough space anyway or b) pinned regions extremely often only contain a few objects.

Another idea may be eagerly reclaiming these (mostly pinned) regions like humongous objects.

Particularly young gen sizing will need to be adapted to take these regions better into account. They are typically very sparsely populated, which means that the region based heuristics will be off.
Comments
Also needs update to young gen sizing as this produces extremely sparsely populated survivor regions which screw up sizing.
14-10-2020