My Oracle Support Banner

[Java SE] Severe Garbage Collection Performance Regression in Early Releases of JDK 21 (Doc ID 3023902.1)

Last updated on JUNE 03, 2024

Applies to:

Java SE JDK and JRE - Version 21 to 21
Information in this document applies to any platform.

Symptoms

With early JDK 21 releases, applications may experience very long garbage collection pauses, upwards of 10 times longer than those of JDK 17. Affected JDK releases:

All stop-the-world (STW) garbage collections of the G1 GC, Parallel GC, and Serial GC are affected, particularly the Class Unloading, Remark, Code Root Scan, and CodeCache cleanup phases of these collections. 

For example, the Remark phase in one instance increased from 400 milliseconds with JDK 17 to 4 seconds with JDK 21. 

The following are JDK 21 G1 GC log excerpts, which show very long pause times during various STW phases:

 

Changes

 The issue is seen after upgrading / migrating to JDK 21 from an earlier JDK version.

Cause

To view full details, sign in with your My Oracle Support account.

Don't have a My Oracle Support account? Click to get started!


In this Document
Symptoms
Changes
Cause
Solution
References

My Oracle Support provides customers with access to over a million knowledge articles and a vibrant support community of peers and Oracle experts.