RFR: Expand old on demand [v63]
William Kemper
wkemper at openjdk.org
Thu May 25 15:32:13 UTC 2023
On Thu, 25 May 2023 03:20:31 GMT, Kelvin Nilsen <kdnilsen at openjdk.org> wrote:
>> This PR describes several proposed changes to dynamically adjust the sizes of old-gen and young-gen. In general, the objective is to keep old-gen as small as possible so that there is an abundance of memory available for the young-gen allocation runway.
>>
>> This PR now passes all GHA pre-integration tests and other internal CI tests.
>
> Kelvin Nilsen has updated the pull request incrementally with two additional commits since the last revision:
>
> - Allow OOM failures to occur more quickly
>
> After a change to increase the defaulit number of consecutive
> degenerated cycles that can occur before a full gc is triggered,
> the number of allocation retries that must be completed before throwing
> an OutOfMemory exception increased significantly. This commit provides
> a mechanism to more quickly decide to throw OOM.
> - Revert default value of ShenandoahGuaranteedYoungGCInterval
>
> The previous change was somewhat arbitrary and masks a bigger problem
> with triggering GC following periods of idle activity. An alternative
> approach to triggering should be developed in the future.
I think it would be simpler/fewer changes to pull full gc count of the existing count in `ShenandoahCollectorPolicy`.
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 358:
> 356:
> 357: // How many full-gc cycles have been completed?
> 358: volatile size_t _completed_fullgc_cycles;
`ShenandoahCollectorPolicy` already counts full GC cycles (implicit and explicit). We could add a `get_full_gc_count` there without duplicating any functionality.
src/hotspot/share/gc/shenandoah/shenandoahHeap.hpp line 397:
> 395:
> 396: void finish_fullgc() {
> 397: Atomic::add(&_completed_fullgc_cycles, (size_t) 1);
`Atomic::inc`? Also - this will only be called on a safepoint at the end of full gc? Does it need atomic access?
-------------
Changes requested by wkemper (Committer).
PR Review: https://git.openjdk.org/shenandoah/pull/248#pullrequestreview-1444165349
PR Review Comment: https://git.openjdk.org/shenandoah/pull/248#discussion_r1205688396
PR Review Comment: https://git.openjdk.org/shenandoah/pull/248#discussion_r1205690065
More information about the shenandoah-dev
mailing list