JDK 21 Feature Update: Garbage Collector Capabilities to Be Reduced, Future Release Expected
The Java Development Kit (JDK) 21 is currently in its initial rampdown phase, which commenced on June 8. As the development team finalizes the feature set, it has become clear that one particular feature is destined for removal: generational Shenandoah, an experimental enhancement for the Shenandoah garbage collector (GC). This decision reflects a focus on ensuring that only mature and robust features are included in the upcoming release, scheduled for production on September 19.
The recent updates on the JDK Enhancement Proposal (JEP) page for JDK 21 indicate a reduction in the official feature set from 16 down to 15, with generational Shenandoah being the feature that will not make the cut. The decision to drop this feature stems from its current lack of readiness, as outlined by the feature’s author, Roman Kennke, from Amazon. Oracle, the organization overseeing Java’s standard development, has stated that the generational Shenandoah will be evaluated for potential inclusion in a future JDK release once it meets the necessary readiness criteria.
Generational Shenandoah was designed to enhance the existing Shenandoah garbage collector by introducing experimental generational collection capabilities. The primary objective was to improve sustainable throughput, resilience during load spikes, and overall memory utilization. By implementing a generational mode, developers aimed to maintain the benefits of non-generational Shenandoah while preparing for a future where generational features could become the default setting for garbage collection in Java.
The ambitious goals for generational Shenandoah included reducing the sustained memory footprint while preserving low GC pause times, minimizing CPU and power usage, and sustaining high throughput during applications’ peak loads. Furthermore, the intent was to decrease the risk of encountering degenerated collections or full collections during periods of high allocation spikes, which can lead to performance degradation. Importantly, the non-generational Shenandoah GC will remain available, ensuring that developers can still leverage its current capabilities without interruption.
The decision to remove generational Shenandoah from JDK 21 underscores a broader trend within the Java community to prioritize stability and performance in production releases. While experimental features can provide exciting possibilities, they must be fully realized and thoroughly tested before being incorporated into widely used software frameworks. This cautious approach aligns with the Java ecosystem’s commitment to delivering reliable and efficient tools for developers.
In summary, the removal of generational Shenandoah from JDK 21 represents a strategic decision to focus on features that are ready for production use. As the Java community continues to evolve, the insights gained from this experimental feature may pave the way for future enhancements in garbage collection strategies. For now, developers can look forward to a stable release of JDK 21 on September 19, equipped with a refined set of features that prioritize performance and reliability.