JEP 521: Generational Shenandoah
Owner | William Kemper |
Type | Feature |
Scope | JDK |
Status | Proposed to Target |
Release | 25 |
Component | hotspot / gc |
Discussion | hotspot dash gc dash dev at openjdk dot org |
Relates to | JEP 404: Generational Shenandoah (Experimental) |
Reviewed by | Martin Doerr, Roman Kennke, Thomas Stuefe |
Endorsed by | Vladimir Kozlov |
Created | 2025/05/14 17:53 |
Updated | 2025/05/21 06:44 |
Issue | 8356990 |
Summary
Change the generational mode of the Shenandoah garbage collector from an experimental feature to a product feature.
Non-Goals
It is not a goal to change the default mode of the Shenandoah collector. By default, Shenandoah will continue to use a single generation.
Motivation
The generational mode of Shenandoah was integrated as an experimental feature by JEP 404 in JDK 24.
Since then, we have implemented many stability and performance improvements. We have tested it extensively on multiple platforms with our own unit tests and with well-known benchmarks and workloads including DaCapo, SPECjbb2015, SPECjvm2008, and Heapothesys. Several users have reported success running demanding workloads.
It is time to drop the generational mode’s experimental status.
Description
In JDK 24, the generational mode of Shenandoah is enabled via the command-line options
$ java -XX:+UseShenandoahGC \
-XX:+UnlockExperimentalVMOptions \
-XX:ShenandoahGCMode=generational ...
The second option, -XX:+UnlockExperimentalVMOptions
, will no longer be needed once the generational mode is a product feature.
We will not change any other options, or their default values.
We do not expect existing users to be impacted by this change. Removing the requirement to specify -XX:+UnlockExperimentalVMOptions
does not make its presence on the command line an error, so existing users need not make any changes to continue using the generational mode.