Bug 1770763 Comment 0 Edit History

Note: The actual edited comment in the bug view page will always show the original commenter’s name and original timestamp.

An approach to optimally allocating memory between multiple GC heaps is outlined here: https://pavpanchekha.com/blog/multi-gc-derivation.html

Current heap limits are set to | W * c | where W is the live memory use and and c is a factor.  To avoid collecting too often for heaps that are growing quickly we adjust the value of c based on the heap size if collections are happening frequently.

The idea is for heap limits to be set to | W + c * square_root(W * g / s) | where g is allocation rate and s is garbage collection rate.  This rule is compositional in that it allocates memory optimally when used by multiple heaps, even without communication.

The goal is to reduce overall memory usage and GC time by allocating memory optimally between heaps, as well as simplifying the heap sizing heuristics.  For maximum effect the heap limits must be recalculated periodically as the allocation rate changes, rather than at the end of GC as currently happens.
An approach to optimally allocating memory between multiple GC heaps is described here: https://arxiv.org/abs/2204.10455

Current heap limits are set to | W * c | where W is the live memory use and and c is a factor.  To avoid collecting too often for heaps that are growing quickly we adjust the value of c based on the heap size if collections are happening frequently.

The idea is for heap limits to be set to | W + c * square_root(W * g / s) | where g is allocation rate and s is garbage collection rate.  This rule is compositional in that it allocates memory optimally when used by multiple heaps, even without communication.

The goal is to reduce overall memory usage and GC time by allocating memory optimally between heaps, as well as simplifying the heap sizing heuristics.  For maximum effect the heap limits must be recalculated periodically as the allocation rate changes, rather than at the end of GC as currently happens.

Back to Bug 1770763 Comment 0