RFR: 8301116: Parallelize TLAB resizing in G1
Thomas Schatzl
tschatzl at openjdk.org
Wed Feb 1 17:11:48 UTC 2023
On Wed, 1 Feb 2023 10:34:36 GMT, Thomas Schatzl <tschatzl at openjdk.org> wrote:
> Hi all,
>
> can I get reviews for this change that moves TLAB resizing into the second parallel post evacuation phase?
>
> The change is fairly straightforward except maybe for the following:
> * there is a new claimer for `JavaThreads` because the `Threads::possibly_parallel_threads_do` method to parallelize does not work well with very little per-thread work. Actually with a moderate amount of threads (~20) performance would already be many times slower than doing things serially.
> * moving the TLAB resizing out of `G1CollectedHeap::prepare_tlabs_for_mutator` made that method and the enclosing timing a bit obsolete, so I repurposed it as a "do preparatory work for the mutator during young gc" phase. That resulted in minor cleanup and regularization of what is done during that phase (wrt to what the corresponding method for full gc does).
>
> Testing: gha, local perf testing, tier1
>
> Thanks,
> Thomas
The reason for this change (and the follow-up(s)) is that in applications with a large number of Java threads (20k+), TLAB retirement, log buffer flushing and TLAB resizing takes 3-7% of total pause time.
Parallelization can reduce this time significantly.
-------------
PR: https://git.openjdk.org/jdk/pull/12360
More information about the hotspot-gc-dev
mailing list