RFR: Plab fallback to minsize
Kelvin Nilsen
kdnilsen at openjdk.org
Fri Jan 6 21:40:18 UTC 2023
On Fri, 6 Jan 2023 19:45:14 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
> If there is not sufficient memory within a region to allocate the desired size of a PLAB, try to allocate a smaller PLAB that is still larger than the minimum PLAB size. This allows more efficient packing of PLABs into available old-gen heap regions.
>
> This patch has been exercised by an internal CI regression testing pipeline and has not introduced any regressions.
>
> Modest reductions in evacuation efforts are seen on benchmarks that do heavy promotion. This is presumably because there are fewer promotion failures, thus less need to repeatedly copy "old" objects within young-gen spaces. Of note, but not entirely explained, is the observation that some evacuation effort has shifted from mutator threads to GC worker threads.
>
> Some regression in jhiccup pause times were observed. This will be explored further after additional patches are integrated.
The code for sizing PLAB requests is in allocate_from_plab_slow(). In general, each thread starts out with PLABs of size PLAB::min_size(). Each time the thread exhausts its existing PLAB, it tries to allocate a new PLAB that's twice as large as its previously preferred PLAB size, even if its previous PLAB is smaller than its previously preferred PLAB size. The consequence of downsizing a particular PLAB is that the thread will end up depleting the downsized PLAB more quickly than normal, which will result in this thread subsequently receiving an even larger PLAB sooner.
-------------
PR: https://git.openjdk.org/shenandoah/pull/195
More information about the shenandoah-dev
mailing list