RFR: 8348595: GenShen: Fix generational free-memory no-progress check [v5]
Paul Hohensee
phh at openjdk.org
Fri Feb 14 10:46:15 UTC 2025
On Fri, 14 Feb 2025 01:18:01 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> At the end of a degenerated GC, we check whether sufficient progress has been made in replenishing the memory available to the mutator. The test for good progress is implemented as a ratio of free memory against the total heap size.
>>
>> For generational Shenandoah, the ratio should be computed against the size of the young generation. Note that the size of the generational collection set is based on young generation size rather than total heap size.
>>
>> This issue first identified in GenShen GC logs, where a large number of degenerated cycles were upgrading to full GC because the free-set progress was short of desired by 10-25%.
>
> Kelvin Nilsen has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains seven additional commits since the last revision:
>
> - 8348092: Shenandoah: assert(nk >= _lowest_valid_narrow_klass_id && nk <= _highest_valid_narrow_klass_id) failed: narrowKlass ID out of range (3131947710)
>
> Reviewed-by: shade
> - Merge tag 'jdk-25+10' into fix-generational-no-progress-check
>
> Added tag jdk-25+10 for changeset a637ccf2
> - Merge tag 'jdk-25+9' into fix-generational-no-progress-check
>
> Added tag jdk-25+9 for changeset 30f71622
> - Add comments suggested by reviewers
> - Respond to reviewer feedback
>
> In testing suggested refinements, I discovered a bug in original
> implementation. ShenandoahFreeSet::capacity() does not represent the
> size of young generation. It represents the total size of the young
> regions that had available memory at the time we most recently rebuilt
> the ShenandoahFreeSet.
>
> I am rerunning the performance tests following this suggested change.
> - Use freeset to determine goodness of progress
>
> As previously implemented, we used the heap size to measure goodness of
> progress. However, heap size is only appropriate for non-generational
> Shenandoah. Freeset abstraction works for both.
> - Use size-of young generation to assess progress
>
> Previously, we were using size of heap to asses progress of generational
> degenerated cycle. But that is not appropriate, because the collection
> set is chosen based on the size of young generation.
Marked as reviewed by phh (Reviewer).
-------------
PR Review: https://git.openjdk.org/jdk/pull/23306#pullrequestreview-2617414395
More information about the shenandoah-dev
mailing list