-
Enhancement
-
Resolution: Fixed
-
P4
-
8-shenandoah, 11.0.9, 15, 16
-
b26
Filed on behalf of William Kemper.
Shenandoah's "adaptive" heuristic triggers a concurrent GC cycle when the average allocation rate since the end of the previous cycle would deplete all available memory (less specified headroom reserve) before a new GC cycle would complete.
When the allocation rate increases sharply, this simple heuristic tends to fail acting in time to prevent a degenerated collection with STW effect, even if there is no risk of heap exhaustion by the application per se.
It has been have observed in some production services that have periodically occurring load spikes that their tail latencies are dominated by such degenerated cycles. We have also reproduced the behavior with a benchmark (details to be added).
A heuristic improvement would schedule concurrent cycles more prudently and be based on the premise that even a few extra concurrent cycles are preferable to incurring degenerated cycles.
Shenandoah's "adaptive" heuristic triggers a concurrent GC cycle when the average allocation rate since the end of the previous cycle would deplete all available memory (less specified headroom reserve) before a new GC cycle would complete.
When the allocation rate increases sharply, this simple heuristic tends to fail acting in time to prevent a degenerated collection with STW effect, even if there is no risk of heap exhaustion by the application per se.
It has been have observed in some production services that have periodically occurring load spikes that their tail latencies are dominated by such degenerated cycles. We have also reproduced the behavior with a benchmark (details to be added).
A heuristic improvement would schedule concurrent cycles more prudently and be based on the premise that even a few extra concurrent cycles are preferable to incurring degenerated cycles.
- relates to
-
JDK-8256912 Zero builds fail after JDK-8255984
- Resolved
-
JDK-8256949 Shenandoah: ditch allocation spike and GC penalties handling
- New