JDK-8315501 : G1: Do not require marking region evacuation in Prepare Mixed GC
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 22
  • Priority: P4
  • Status: Resolved
  • Resolution: Won't Fix
  • Submitted: 2023-09-01
  • Updated: 2023-09-05
  • Resolved: 2023-09-05
Related Reports
Relates :  
Description
Since JDK-8140326 we allow reclamation of old gen regions reclaimed at any gc. There is the set of regions selected by marking that is supposed to be guaranteed to be evacuated during Mixed GCs. That set is however already available during the Prepare Mixed gc, forcing it to collect the minimum set of old regions even if we did not provide time for it.

For marking candidate regions, allow the gc to not add any of these regions.
Comments
WNF for now as we just disable reclamation of marking old regions during Prepare Mixed instead ( JDK-8315686)
05-09-2023

Here is a log snippet showing the problematic case: [205,802s][gc,start ] GC(21) Pause Young (Prepare Mixed) (G1 Evacuation Pause) [205,802s][gc,heap ] GC(21) Heap before GC invocations=21 (full 2): [205,802s][gc,heap ] GC(21) garbage-first heap total 31457280K, used 9438047K [0x0000000080000000, 0x0000000800000000) [205,802s][gc,heap ] GC(21) region size 32768K, 202 young (6619136K), 27 survivors (884736K) [205,802s][gc,heap ] GC(21) Metaspace used 128262K, committed 132992K, reserved 1179648K [205,802s][gc,heap ] GC(21) class space used 8027K, committed 11264K, reserved 1048576K [205,802s][gc,task ] GC(21) Using 16 workers of 16 for evacuation [205,802s][gc,ergo,cset ] GC(21) Start adding marking candidates to collection set. Min 1 regions, max 96 regions, time remaining 3,49ms, optional threshold 0,70ms [205,802s][gc,ergo,cset ] GC(21) Marking candidates exhausted. [205,802s][gc,ergo,cset ] GC(21) Finish adding marking candidates to collection set. Initial: 2, optional: 0, predicted initial time: 2,31ms, predicted optional time: 0,00ms, t$ As you can see, we are in a Prepare Mixed gc and we require a marking candidate region ("Min 1 regions")
01-09-2023