RFR: 8257145: Performance regression with -XX:-ResizePLAB after JDK-8079555

Thomas Schatzl tschatzl at openjdk.java.net
Fri Nov 27 11:16:57 UTC 2020


On Fri, 27 Nov 2020 10:11:59 GMT, Stefan Johansson <sjohanss at openjdk.org> wrote:

>> src/hotspot/share/gc/g1/g1CollectedHeap.cpp line 1409:
>> 
>>> 1407:   _bytes_used_during_gc(0),
>>> 1408:   _archive_allocator(NULL),
>>> 1409:   _survivor_evac_stats("Young", YoungPLABSize * ParallelGCThreads, PLABWeight),
>> 
>> Lgtm, will do some perf measurements and get back to you.
>> Could you add a comment like the following in the G1EvacStats constructor?
>> 
>> // desired_plab_size_ should be the total PLAB size for all threads.
>
> Just one note, if we run with `UseDynamicNumberOfGCThreads` the PLAB size might still be "resized" between GCs if they use different number of threads. This is still an improvement since the old value is wrong and will give a way to small PLAB size. But we might want to look at a solution that will always return a fixed PLAB size with `-ResizePLAB`.

I agree and noted that in the CR already. As you mention, it is still an improvement, and with `-XX:+ResizePLAB` G1 will automatically resize the PLABs back to more reasonable if needed (as G1 previously used a way too small PLAB initially).

Giving that typical number or threads correlate somewhat with heap size, and the policy for `-XX:+UseDynamicNumberOfThreads` is fairly conservative anyway, this change will "always" return the (correct) fixed PLAB size with `-XX:-ResizePLAB` now.

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

PR: https://git.openjdk.java.net/jdk/pull/1474



More information about the hotspot-gc-dev mailing list