JDK-8356990 : JEP 521: Generational Shenandoah
  • Type: JEP
  • Component: hotspot
  • Sub-Component: gc
  • Priority: P4
  • Status: Closed
  • Resolution: Delivered
  • Fix Versions: 25
  • Submitted: 2025-05-14
  • Updated: 2025-06-06
  • Resolved: 2025-06-06
Related Reports
Relates :  
Relates :  
Description
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](https://openjdk.org/jeps/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](https://github.com/dacapobench/dacapobench), [SPECjbb2015](https://www.spec.org/jbb2015/), [SPECjvm2008](https://www.spec.org/jvm2008/), and [Heapothesys](https://github.com/corretto/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.

Comments
There was a high number of issues in the JDK 24 version which have been fixed. I haven't seen critical issues, recently. The non-critical ones (like verifier errors) can still get fixed. So, I'm ok with this.
19-05-2025

[~mr], Thank you for the copy editing.
16-05-2025

I think this is still fine for JDK 25, and it would be good to have in the next LTS. Generational Shenandoah has been extensively tested at Amazon.
16-05-2025