RFR: 8377180: Shenandoah: make escalation from degen to full more conservative [v3]

Kelvin Nilsen kdnilsen at openjdk.org
Thu Feb 5 22:32:44 UTC 2026


> This PR merges into Traditional Shenandoah an optimization that was applied to Generational Shenandoah in September 2025 and has proven itself effective in that context.  See https://github.com/openjdk/jdk/pull/27456
> 
> The change is to not immediately escalate Degenerated GC to Full GC following "bad progress" by Degen GC.  The most common reason for bad degenerated progress is that most of the potential garbage was created following the start of the concurrent GC cycle which degenerated.  This "floating" garbage cannot be reclaimed by the degenerated cycle because of the SATB protocol.
> 
> Pursuing at least one additional concurrent cycle, even if that subsequent concurrent GC degenerates, is usually a much better approach than forcing immediate escalation to Full GC.  While escalation to full GC will resolve the out-of-memory condition, it imposes unnecessarily long stop-the-world pauses:
> 
>    Existing behavior not to scale:
>        <- [       Conc GC       ] -> <- [ Degen    ] -> <- [            Full GC             ]
>           [    experiences      ]       [  with    ]
>           [     allocation      ]       [   bad    ]
>           [      failure        ]       [ progress ]
>                                         [ STW pause is 100 ms degen + 3s full GC            ]
> 
>    Revised behavior not to scale:
>        <- [       Conc GC       ] -> <- [ Degen    ] -> <- [       Conc GC       ] -> [ Degen    ]
>           [    experiences      ]       [  with    ]       [    experiences      ]    [  with    ]
>           [     allocation      ]       [   bad    ]       [     allocation      ]    [  good    ]
>           [      failure        ]       [ progress ]       [      failure        ]    [ progress ]
>                                         [  100 ms  ]                                  [  100 ms  ] 
>                                         [   pause  ]                                  [   pause  ]

Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:

  Fix constant name and comments

-------------

Changes:
  - all: https://git.openjdk.org/jdk/pull/29574/files
  - new: https://git.openjdk.org/jdk/pull/29574/files/0f094a68..d8d5423f

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=02
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=29574&range=01-02

  Stats: 11 lines in 1 file changed: 0 ins; 7 del; 4 mod
  Patch: https://git.openjdk.org/jdk/pull/29574.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29574/head:pull/29574

PR: https://git.openjdk.org/jdk/pull/29574


More information about the shenandoah-dev mailing list