The Compressor: concurrent, incremental, and parallel compaction

The widely used Mark-and-Sweep garbage collector has a drawback in that it does not move objects during collection. As a result, large long-running realistic applications, such as Web application servers, frequently face the fragmentation problem. To eliminate fragmentation, a heap compaction is run periodically. However, compaction typically imposes very long undesirable pauses in the application. While efficient concurrent collectors are ubiquitous in production runtime systems (such as JVMs), an efficient non-intrusive compactor is still missing.In this paper we present the Compressor, a novel compaction algorithm that is concurrent, parallel, and incremental. The Compressor compacts the entire heap to a single condensed area, while preserving the objects' order, but reduces pause times significantly, thereby allowing acceptable runs on large heaps. Furthermore, the Compressor is the first compactor that requires only a single heap pass. As such, it is the most efficient compactors known today, even when run in a parallel Stop-the-World manner (i.e., when the program threads are halted). Thus, to the best of our knowledge, the Compressor is the most efficient compactor known today. The Compressor was implemented on a Jikes Research RVM and we provide measurements demonstrating its qualities.

[1]  Erez Petrank,et al.  An efficient parallel heap compaction algorithm , 2004, OOPSLA.

[2]  S. L. Graham,et al.  List Processing in Real Time on a Serial Computer , 1978 .

[3]  Andrew W. Appel,et al.  Virtual memory primitives for user programs , 1991, ASPLOS IV.

[4]  V. T. Rajan,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003, LCTES '03.

[5]  J. Eliot B. Moss,et al.  Mark-copy: fast copying GC with less space overhead , 2003, OOPSLA '03.

[6]  F. Dupont,et al.  Incremental incrementally compacting garbage collection , 1987, PLDI 1987.

[7]  Bowen Alpern,et al.  Implementing jalapeño in Java , 1999, OOPSLA '99.

[8]  Elliot K. Kolodner,et al.  An algorithm for parallel incremental compaction , 2002, ISMM '02.

[9]  Nir Shavit,et al.  Parallel Garbage Collection for Shared Memory Multiprocessors , 2001, Java Virtual Machine Research and Technology Symposium.

[10]  J. Eliot B. Moss,et al.  Mark-copy: fast copying GC with less space overhead , 2003, OOPSLA 2003.

[11]  F. Lockwood Morris,et al.  A time- and space-efficient garbage compaction algorithm , 1978, CACM.

[12]  Erez Petrank,et al.  An on-the-fly mark and sweep garbage collector based on sliding views , 2003, OOPSLA '03.

[13]  Yoav Ossia,et al.  Mostly concurrent compaction for mark-sweep GC , 2004, ISMM '04.

[14]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[15]  Scott Shenker,et al.  Mostly parallel garbage collection , 1991, PLDI '91.

[16]  Marc Feeley,et al.  A compacting incremental collector and its performance in a production quality compiler , 1998, ISMM '98.

[17]  Perry Cheng,et al.  Oil and water? High performance garbage collection in Java with MMTk , 2004, Proceedings. 26th International Conference on Software Engineering.

[18]  Emery D. Berger,et al.  Garbage collection without paging , 2005, PLDI '05.

[19]  Erez Petrank,et al.  An on-the-fly mark and sweep garbage collector based on sliding views , 2003, OOPSLA 2003.

[20]  H. B. M. Jonkers,et al.  A Fast Garbage Compaction Algorithm , 1979, Inf. Process. Lett..

[21]  Emery D. Berger,et al.  MC2: high-performance garbage collection for memory-constrained environments , 2004, OOPSLA.

[22]  J. Eliot B. Moss,et al.  Sapphire: copying GC without stopping the world , 2001, JGI '01.