JEP 379: Promote low-pause-time garbage collector Shenandoah to production
Shenandoah has been part of the JDK since Java 12. When it was integrated, it was given experimental status similar to Epsilon GC and ZGC. JEP 379 proposes to change its status from experimental to production – and it will get its way, since JEP 379 is officially targeted to JDK 15. Let’s take a closer look.
Java’s Shenandoah garbage collector
Shenandoah was introduced to JDK 12 by JEP 189, where it is described as a garbage collector that “reduces GC pause times by doing evacuation work concurrently with the running Java threads. Pause times with Shenandoah are independent of heap size, meaning you will have the same consistent pause times whether your heap is 200 MB or 200 GB.”
As with other garbage collectors introduced to the JDK in recent years, Epsilon GC and ZGC for example, Shenandoah was marked as experimental. However, now JEP owner Aleksey Shipilev proposes that it’s time for Shenadoah to lose the “experimental” moniker and become a production feature of Java 15.
Currently, Shenandoah is enabled using the
-XX:+UseShenandoahGC command options. Changing it to production would mean that
-XX:+UnlockExperimentalVMOptions is no longer necessary. Shipilev also notes that several Shenandoah-related flags would also become “product” instead of “experimental”, but that since the default values will not be any different, the changes will be predominantly cosmetic. He also writes:
At the time of its integration into JDK 12, Shenandoah had been already shipping in Red Hat 8u and 11u downstream releases as a supported garbage collector, and used by RHEL and RHEL downstream users. Because of this, Shenandoah 8u and Shenandoah 11u are already non-experimental and thus not affected by this change. Since there are only a few users that run something other than 8u and 11u, we expect the actual impact of this change to be minuscule.