C4: Continuously Concurrent Compacting Collector
C4: The Continuously Concurrent Compacting Collector
Authors: Gil Tene, Balaji Iyengar and Michael Wolf
Summary: The Azul Pauseless Garbage Collector is now available in updated form as C4, the Continuously Concurrent Compacting Collector. This paper, originally presented to the International Symposium on Memory Management (ISMM), describes the inner workings of the collector and how it is able to sustain high allocation rates without sacrificing response times or resorting to 'stop-the'world' collections. C4 is now available in its first-ever software-only commercial implementation for modern commodity x86 hardware as part of the Zing JVM.
Abstract: C4, the Continuously Concurrent Compacting Collector, an updated generational form of the Pauseless GC Algorithm , is introduced and described, along with details of its implementation on modern X86 hardware. It uses a read barrier to support concurrent compaction, concurrent remapping, and concurrent incremental update tracing. C4 differentiates itself from other generational garbage collectors by supporting simultaneous-generational concurrency: the different generations are collected using concurrent (non stop-the-world) mechanisms that can be simultaneously and independently active. C4 is able to continuously perform concurrent young generation collections, even during long periods of concurrent full heap collection, allowing C4 to sustain high allocation rates and maintain the efficiency typical to generational collectors, without sacrificing response times or reverting to stop-the-world operation. Azul systems has been shipping a commercial implementation of the Pauseless GC mechanism since 2005. Three successive generations of Azul's Vega series systems relied on custom multi-core processors and a custom OS kernel to deliver both the scale and features needed to support Pauseless GC. In 2010, Azul released its first software-only commercial implementation of C4 for modern commodity X86 hardware, using Linux kernel enhancements to support the required feature set. We discuss implementation details of C4 on X86, including the Linux virtual and physical memory management enhancements that were used to support the high rate of virtual memory operations required for sustained pauseless operation. We discuss updates to the collector's management of the heap for efficient generational collection and provide throughput and pause time data while running sustained workloads.
Published in the International Symposium on Memory Management 2011 proceedings, copyright ACM, New York, NY, USA, 2011. Posted here under license from ACM.