RFR: 8312116: GenShen: make instantaneous allocation rate triggers more timely [v9]

Kelvin Nilsen kdnilsen at openjdk.org
Fri Jan 16 15:48:05 UTC 2026


> After studying large numbers of GC logs with degenerated cycles that have resulted from "late" triggers, we propose the following general improvements:
> 
> 1. Track trends in GC times rather than always using the average GC time plus standard deviation.  In many situations, GC times trend upward due to, for example, increasing amounts of live data that must be marked as a workload builds up its working set of memory.
> 2. Sample allocation rates more frequently than once every 100 ms.
> 3. Track trends in allocation rates.  In some situations, the allocation rate trends upwards due to, for example, the start of a new phase of execution or a spike in client workload.
> 4. When we detect acceleration of allocation rate, predict consumption of memory based on accelerated allocation rates rather than assuming constant allocation rate.

Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The pull request now contains 73 commits:

 - Fix compile errors following merge from master
   
   But there are still many correctness failures following this merge.
   Still debugging.
 - Merge remote-tracking branch 'jdk/master' into accelerated-triggers
 - Respond to reviewer feedback
 - Remove unneeded functions
 - Changes requested by reviewers
   
   1. Change coordination between ShenandoahAdaptiveHeuristics and
      ShenandoahController/ShenandoahRegulator.  Before,
      ShenandoahAdaptiveHeuristics would poll ShenandoahController or
      ShenandoahRegulator to obtain most recent wake time and planned sleep
      time.  Now ShnandoahController and and ShenandoahRegulator notify
      ShenandoahAdaptiveHeuristics each time the values of these variables
      change.
   
   2. Use available() instead of capacity() - used() when recalculating
      trigger threshold from within
      ShenandoahAdaptiveHeuristcs::resume_idle_span().
 - move some post_initialize() work into subclass ShenandoahGenerationalHeuristics
 - Merge remote-tracking branch 'jdk/master' into accelerated-triggers
 - Merge remote-tracking branch 'jdk/master' into accelerated-triggers
 - Fix comment
 - Use PROPERFMT macros
 - ... and 63 more: https://git.openjdk.org/jdk/compare/34705a77...ce54e38d

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

Changes: https://git.openjdk.org/jdk/pull/29039/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=29039&range=08
  Stats: 1004 lines in 24 files changed: 893 ins; 41 del; 70 mod
  Patch: https://git.openjdk.org/jdk/pull/29039.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/29039/head:pull/29039

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


More information about the shenandoah-dev mailing list