Red Hat Shenandoah boosts Java garbage collection

25.02.2015
Red Hat engineers are moving forward with their Shenandoah garbage collection technology, which would give Java a boost in large-heap applications.

Proposed as an OpenJDK open source Java project last week, Shenandoah is intended to reduce garbage collection pause times. "Existing GCs show pause times of several 100ms up to several seconds on heaps [greater than] 100GB," said Red Hat software engineer Roman Kennke, in his proposal. "That's because they need to stop all Java threads for compacting the heap."

Shenandoah, billed as being "an almost pause-less garbage collection algorithm," has been in development as part of the IcedTea Java project.  Shenandoah implements a new algorithm that allows for heap compaction while only stopping the Java threads briefly for root scanning; it then evacuates the heap concurrently. This makes pause times unrelated to the heap size and only proportional to the root set size, Kennke explained.

In emailed responses to questions, Kennke, who has been working on Shenandoah for two years, said the reduction in pause times would enable applications to meet stringent quality of service guarantees. Shenandoah is aimed at in-memory databases and InfiniSpan in-memory key value data store and grid systems, and a planned update to the SPECjbb2013 benchmark suite also would be a target.

"Shenandoah is a parallel and concurrent compacting garbage collector. Parallel meaning we use multiple threads to get the GC work done faster, and concurrent meaning we do work while the Java threads are running," said Kennke, who is working on Shenandoah with Red Hat engineer Christine Flood. "We are the first collector in OpenJDK to do compaction while the Java program is running."

Developers of Shenandoah hope to see it incorporated into the Java HotSpot VM but could offer no assurances that this would happen. Kennke also said developers are not certain yet if Shenandoah could be included in Java Standard Edition 9 in time for that release, which has been slated for a 2016 arrival.

Shenandoah is a region-based garbage collector. "It is freely available, open source, and anyone who wants to can download it," Kennke said. "We have had several early testers."

(www.infoworld.com)

Paul Krill