RFR: Initial sizing refactor
William Kemper
wkemper at openjdk.org
Tue Dec 20 19:19:23 UTC 2022
On Tue, 20 Dec 2022 00:59:34 GMT, Y. Srinivas Ramakrishna <ysr at openjdk.org> wrote:
>> Some things to highlight here:
>> * This change borrows a bit of code from G1 to handle processing of command line arguments used to size the young generation.
>> * A (hard coded for now) threshold on the difference between young/old time has been added to reduce resizing churn.
>> * The adaptive heuristic doesn't consider the `soft_tail` anymore. `available` is already adjusted for the soft max capacity.
>> * `SoftMaxHeapSize` is used to compute the soft max size and max size for the young generation.
>
> src/hotspot/share/gc/shenandoah/shenandoahHeap.cpp line 459:
>
>> 457: _young_generation = new ShenandoahYoungGeneration(_max_workers, max_capacity_young, initial_capacity_young);
>> 458: _old_generation = new ShenandoahOldGeneration(_max_workers, max_capacity_old, initial_capacity_old);
>> 459: _global_generation = new ShenandoahGlobalGeneration(_max_workers, soft_max_capacity(), soft_max_capacity());
>
> A single line of comment here would be helpful here. It sounds as if the idea is that for the so-called global generation (which I assume is identified with the entirety of the committed heap at any time), the initial and max (floor and ceiling) are both set at `soft_max_capacity` ? What does that mean? I might have naively expected this to be, respectivley, `max_old + max_young` and `initial_old + initial_young` like you had it before.
I've been thinking of the max capacity as the maximum _allowed_ capacity. For example, the maximum _allowed_ capacity for old would be `total heap - minimum capacity of young`. So, the sum of the maximum allowed for old and young could exceed the total. If that makes sense, I will put the explanation in a comment here.
-------------
PR: https://git.openjdk.org/shenandoah/pull/185
More information about the shenandoah-dev
mailing list