Enhance the Shenandoah garbage collector with experimental generational capabilities to improve sustainable throughput, load-spike resilience, and memory utilization.
Objects tend to have bimodal lifetimes, with the large majority dying young. However, some programs have a large corpus of data that tends to be longer-lived. Non-generational collectors such as Shenandoah tend to spend time and cpu cycles tracing these older, longer-lived objects but finding little space to reclaim. Generational collectors tend to be more efficient by focusing effort on younger, more recently created objects where one is more likely to reclaim free space.
Since most objects die young, and objects that survive longer tend to be relatively long-lived, generational collectors focus GC effort on younger objects, tenuring longer-lived objects to the older generation where they do not need to be examined as often by GC. All GCs in HotSpot today, other than ZGC and Shenandoah, are generational. This JEP extends Shenandoah with an experimental generational mode of operation.
When Shenandoah is enabled in the usual manner via
the new experimental generational feature may be optionally enabled via the JVM command line options
The generational feature and any additional new flags governing its behavior are classified as Experimental. These new Experimental flags are evolving and subject to further change. They may be found in the PR associated with the linked Implementation task.
No new product flags have been added and no existing product flags have been modified.
When the generational mode isn't enabled, Shenandoah continues to behave as before.