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

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


On Mon, 18 Sep 2023 17:07:41 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

> 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.

I'm leaving this in draft mode until I complete functional and performance testing and remove the temporary instrumentation code.

Experiments with various workloads show these changes to decrease the number of degenerated GCs.  In some cases, the greater sensitivity of the acceleration trigger causes more frequent GCs than without it.  I am experimenting with various configuration options on multiple workloads to determine an "optimal" default configuration.

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

PR Comment: https://git.openjdk.org/shenandoah/pull/327#issuecomment-1724018834
PR Comment: https://git.openjdk.org/shenandoah/pull/327#issuecomment-1726363501


More information about the shenandoah-dev mailing list