RFR: Shrink tlab to capacity [v2]

William Kemper wkemper at openjdk.org
Mon Dec 19 23:43:27 UTC 2022


On Mon, 12 Dec 2022 23:17:11 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:

>> When a TLAB request exceeds the currently available memory within young-gen, the existing behavior is to reject the TLAB request outright. This is recognized as a failed allocation request, which triggers degenerated GC.
>> 
>> This change introduces code to reduce the likelihood that too-large TLAB requests will be issued, and when they are issued, it makes an effort to shrink the TLAB request in order to reduce the need for degenerated GC.
>> 
>> The impact is difficult to measure because this situation is fairly rare.  On one Extremem workload, the TLAB-shrinking code is exercised only once during a 16-minute run involving 500 concurrent GCs, a 45 GiB heap, and a 28 GiB young-gen size.  The change reduces the degenerated GCs from 6 to 5.
>> 
>> One reason that the remaining 5 degenerated GCs are not addressed by this change is that further work is required to handle a situation in which a requested TLAB is smaller than the available young-gen memory, but available memory is set aside in the evacuation reserve so cannot be provided to a mutator.  Future work will address this condition.
>
> Kelvin Nilsen has updated the pull request incrementally with one additional commit since the last revision:
> 
>   Clarify recursive implementation of allocate_memory_under_lock
>   
>   (with a comment)

Looks good. Thank you.

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

Marked as reviewed by wkemper (Committer).

PR: https://git.openjdk.org/shenandoah/pull/180


More information about the shenandoah-dev mailing list