JDK-8272980 : Only trigger preventive collections when there is reason that it will help
  • Type: Enhancement
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 18
  • Priority: P4
  • Status: Closed
  • Resolution: Won't Fix
  • Submitted: 2021-08-25
  • Updated: 2022-12-14
  • Resolved: 2022-12-14
Related Reports
Relates :  
Relates :  
Description
Preventive collections were introduced in JDK-8257774 to help with evacuation failures.

The assumption has been that we should do a young collection in presence of short bursts of short living humongous objects preventively because eager humongous reclaim would reclaim those quickly anyway, freeing enough space.

The current implementation does not consider the fact that if there are no humongous eager reclaim candidates (or any humongous objects) g1 won't free any extra space, so the preventive collection is useless, wasting time to do these preventive collections before going into a full gc.
Comments
Closing because we are removing the feature in JDK-8297639.
14-12-2022