Integrated: 8377561: Parallel: Large allocations cause Full GC storm without heap expansion
Albert Mingkun Yang
ayang at openjdk.org
Mon Feb 16 14:40:41 UTC 2026
On Wed, 11 Feb 2026 13:57:02 GMT, Albert Mingkun Yang <ayang at openjdk.org> wrote:
> `ParallelScavengeHeap::should_alloc_in_eden` uses the current eden-capacity to decide whether an allocation should be in eden and the same criteria is also used to decide whether we should run young/full gc to satisfy a failed allocations. When the young-gen/eden-size is relatively small (due to initial heap being small or heap has shrunk), the use of the current eden-capacity can cause full-gc, instead of young-gc, to run, as shown in the attached bm in this bug (https://bugs.openjdk.org/browse/JDK-8377561).
>
> Use "max" eden capacity as the calculation basis so that the threshold is more resilient to heap resizing.
>
> The attached bm runs thousands of full-gc before the fix but zero full-gc after the fix.
>
> Test: tier1-5
This pull request has now been integrated.
Changeset: f5e1e313
Author: Albert Mingkun Yang <ayang at openjdk.org>
URL: https://git.openjdk.org/jdk/commit/f5e1e313dab2aa63711c6a64d363e88409bff4ba
Stats: 5 lines in 1 file changed: 3 ins; 0 del; 2 mod
8377561: Parallel: Large allocations cause Full GC storm without heap expansion
Reviewed-by: tschatzl, jsikstro
-------------
PR: https://git.openjdk.org/jdk/pull/29673
More information about the hotspot-gc-dev
mailing list