JDK-8309960 : ParallelGC young collections very slow in DelayInducer
  • Type: Bug
  • Component: hotspot
  • Sub-Component: gc
  • Affected Version: 21,22
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2023-06-13
  • Updated: 2024-08-26
  • Resolved: 2023-06-19
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 21 JDK 22
21 b28Fixed 22Fixed
Related Reports
Relates :  
Relates :  
Relates :  
Relates :  
Relates :  
Description
In the benchmark DelayInducer from JDK-8062128 Parallel GC young collections are extremely slow compared to G1.

I.e. with -Xmn1g -Xms3g -Xmx3g on both collectors, G1 takes 130-360ms for young collections, Parallel GC young collections take 666-8863(!)ms.

There seems to be a problem with the work queue/task stealing. See the attached logs showing task queue statistics; just compare the steal statistics (prefixed with "st-") where parallel gc looks extremely bad.
Comments
Verified manually and in CI. The effect, it should be noted, is intermittent - some runs show very little or negligible difference between fixed and flawed ParallelGC. But many show 2-4x difference.
18-07-2023

Changeset: 4d81b899 Author: Albert Mingkun Yang <ayang@openjdk.org> Date: 2023-06-19 11:09:04 +0000 URL: https://git.openjdk.org/jdk21/commit/4d81b8998ae2e5c02a47264496bb87cc0c18808c
19-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk21/pull/22 Date: 2023-06-15 12:12:23 +0000
15-06-2023

A pull request was submitted for review. URL: https://git.openjdk.org/jdk/pull/14469 Date: 2023-06-14 14:09:07 +0000
14-06-2023

Fwiw, the initial change in JDK-8300447 is good.
14-06-2023

The regression has been introduced with JDK-8300447. The performance is still very bad compared to G1 though after backing it out, but it's not a regression any more.
13-06-2023

Seems to be particularly bad with 21/22, the second young gc with parallel gc is twice as slow than 20 or earlier releases (see attached pause times in delayinducer-parallel-jdk20.txt). I.e. looks like a regression in 21.
13-06-2023