JDK-8315502 : G1: Abort mixed phase if Prepare Mixed cleaned out all marking regions
  • Type: Enhancement
  • 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
With JDK-8140326 it is possible that the Prepare Mixed phase evacuates all marking regions already. In this case the following mixed gcs can be skipped completely.

This is a problem of displaying the type of GC, and that g1 will wastefully use the predictions for the mixed phase for young gen sizing.
Comments
WNF for now as we just disable reclamation of marking old regions during Prepare Mixed instead ( JDK-8315686)
05-09-2023

Log snippet: [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$ [205,802s][gc,ergo,cset ] GC(21) Start adding retained candidates to collection set. Min 1 regions, time remaining 1,18ms, optional remaining 80,00ms [205,802s][gc,ergo,cset ] GC(21) Retained candidates exhausted. [...] [223,950s][gc,start ] GC(22) Pause Young (Mixed) (G1 Evacuation Pause) [223,950s][gc,heap ] GC(22) Heap before GC invocations=22 (full 2): [223,950s][gc,heap ] GC(22) garbage-first heap total 31457280K, used 10862750K [0x0000000080000000, 0x0000000800000000) [223,950s][gc,heap ] GC(22) region size 32768K, 216 young (7077888K), 11 survivors (360448K) [223,950s][gc,heap ] GC(22) Metaspace used 128379K, committed 133120K, reserved 1179648K [223,950s][gc,heap ] GC(22) class space used 8032K, committed 11264K, reserved 1048576K [223,951s][gc,task ] GC(22) Using 16 workers of 16 for evacuation [223,951s][gc,ergo,cset ] GC(22) No candidates to reclaim. I.e. gc(21) cleared out all candidates for mixed gc(22).
01-09-2023