RFR: 8312116 GenShen: make instantaneous allocation rate triggers more timely

Kelvin Nilsen kdnilsen at openjdk.org
Tue Sep 19 19:43:41 UTC 2023


When heuristics fail to trigger because an instantaneous "allocation spike" is not so large as to consume all available memory before GC completes, this assessment is based on an assumption that the allocation rate remains constant, and it ignores the time that will be lost due to the _interval between consecutive allocation spike measurements.

This PR watches for "acceleration" of allocation rates.  When acceleration of allocation is detected in 3 consecutive allocation spike measurements, it calculates a best-fit curve (assuming constant acceleration) and predicts the memory to be consumed during the time that spans both the next sample interval and the GC effort that follows it.  If the memory to be allocated according to anticipated acceleration of allocations during this time span exceeds what is available, we trigger immediately.

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

Commit messages:
 - Add every sample to history but only trigger if spiking
 - Change _last_trigger to OTHER for accelerated-rate trigger
 - Fix white space
 - Improve log message and fix white space
 - Fixup errors in computation of accelerated memory consumption
 - Merge remote-tracking branch 'origin' into make-instantaneous-alloc-rate-trigger-quicker
 - Add a new form of allocation spike trigger for accelerating alloc rates

Changes: https://git.openjdk.org/shenandoah/pull/327/files
 Webrev: https://webrevs.openjdk.org/?repo=shenandoah&pr=327&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8312116
  Stats: 306 lines in 5 files changed: 297 ins; 0 del; 9 mod
  Patch: https://git.openjdk.org/shenandoah/pull/327.diff
  Fetch: git fetch https://git.openjdk.org/shenandoah.git pull/327/head:pull/327

PR: https://git.openjdk.org/shenandoah/pull/327


More information about the shenandoah-dev mailing list