ABSTRACT
Programmers are increasingly choosing managed languages for modern applications, which tend to allocate many short-to-medium lived small objects. The garbage collector therefore directly determines program performance by making a classic space-time tradeoff that seeks to provide space efficiency, fast reclamation, and mutator performance. The three canonical tracing garbage collectors: semi-space, mark-sweep, and mark-compact each sacrifice one objective. This paper describes a collector family, called mark-region, and introduces opportunistic defragmentation, which mixes copying and marking in a single pass. Combining both, we implement immix, a novel high performance garbage collector that achieves all three performance objectives. The key insight is to allocate and reclaim memory in contiguous regions, at a coarse block grain when possible and otherwise in groups of finer grain lines. We show that immix outperforms existing canonical algorithms, improving total application performance by 7 to 25% on average across 20 benchmarks. As the mature space in a generational collector, immix matches or beats a highly tuned generational collector, e.g. it improves jbb2000 by 5%. These innovations and the identification of a new family of collectors open new opportunities for garbage collector design.
- D. Abuaiadh, Y. Ossia, E. Petrank, and U. Silbershtein. An efficient parallel heap compaction algorithm. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, pages 224--236, Vancouver, BC, Canada, 2004. ACM. Google Scholar
Digital Library
- B. Alpern, D. Attanasio, J. J. Barton, M. G. Burke, P.Cheng, J.-D. Choi, A. Cocchi, S. J. Fink, D. Grove, M. Hind, S. F. Hummel, D. Lieber, V. Litvinov, M. Mergen, T. Ngo, J. R. Russell, V. Sarkar, M. J. Serrano, J. Shepherd, S. Smith, V. C. Sreedhar, H. Srinivasan, and J. Whaley. The Jalapeño virtual machine. IBM System Journal, 39(1), Feb. 2000. Google Scholar
Digital Library
- B. Alpern, D. Attanasio, J. J. Barton, A. Cocchi, S. F. Hummel, D. Lieber, M. Mergen, T. Ngo, J. Shepherd, and S. Smith. Implementing Jalapeño in Java. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, Denver, CO, Nov. 1999. Google Scholar
Digital Library
- A. W. Appel. Simple generational garbage collection and fast allocation. Software Practice and Experience, 19(2):171--183, 1989. Google Scholar
Digital Library
- M. Arnold, S. J. Fink, D. Grove, M. Hind, and P. Sweeney. Adaptive optimization in the Jalape?no JVM. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, pages 47--65, Minneapolis, MN, October 2000. Google Scholar
Digital Library
- C. Attanasio, D. Bacon, A. Cocchi, and S. Smith. A comparative evaluation of parallel garbage collectors. In Proceedings of the Workshop on Languages and Compilers for Parallel Computing, Cumberland Falls, KY, Aug. 2001. Google Scholar
Digital Library
- D. F. Bacon, P. Cheng, and V. T. Rajan. Controlling fragmentation and space consumption in the Metronome a real-time garbage collector for Java. In ACM Conference on Languages, Compilers, and Tools for Embedded Systems, pages 81--92, San Diego, CA, June 2003. Google Scholar
Digital Library
- D. F. Bacon, P. Cheng, and V. T. Rajan. A real-time garbage collector with low overhead and consistent utilization. In ACM Symposium on the Principles of Programming Languages, pages 285--294, New Orleans, LA, Jan. 2003. Google Scholar
Digital Library
- H. G. Baker. List processing in real-time on a serial computer. Communications of the ACM, 21(4):280--94, 1978. Google Scholar
Digital Library
- K. Barabash, O. Ben-Yitzhak, I. Goft, E. K. Kolodner, V. Leikehman, Y. Ossia, A. Owshanko, and E. Petrank. A parallel, incremental, mostly concurrent garbage collector for servers. ACM Transactions on Programming Languages and Systems, 27(6):1097--1146, 2005. Google Scholar
Digital Library
- BEA Systems Inc. Using the JRockit runtime analyzer. http://edocs.bea.com/wljrockit/docs142/usingJRA/looking.html, 2007.Google Scholar
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In Proceedings of the ACM Conference on Measurement & Modeling Computer Systems, pages 25--36, NY, NY, June 2004. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Oil and water? High performance garbage collection in Java with MMTk. In Proceedings of the 26th International Conference on Software Engineering, pages 137--146, Scotland, UK, May 2004. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, pages 169--190, Portland, OR, USA, Oct. 2006. Google Scholar
Digital Library
- S. M. Blackburn, R. Garner, C. Hoffman, A. M. Khan, K. S. McKinley, R. Bentzur, A. Diwan, D. Feinberg, D. Frampton, S. Z. Guyer, M. Hirzel, A. Hosking, M. Jump, H. Lee, J. E. B. Moss, A. Phansalkar, D. Stefanović, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo Benchmarks: Java benchmarking development and analysis (extended version). Technical Report TR-CS-06-01, Dept. of Computer Science, Australian National University, 2006. http://www.dacapobench.org.Google Scholar
- S. M. Blackburn and A. Hosking. Barriers: Friend or foe? In The ACM International Symposium on Memory Management, pages 143--151, Vancouver, BC, Canada, Oct. 2004. Google Scholar
Digital Library
- S. M. Blackburn, R. E. Jones, K. S. McKinley, and J. E. B. Moss. Beltway: Getting around garbage collection gridlock. In ACM Conference on Programming Language Design and Implementation, pages 153--164, Berlin, Germany, June 2002. Google Scholar
Digital Library
- S. Borman. Sensible sanitation ? understanding the IBM Java garbage collector. http://www.ibm.com/developerworks/ibm/library/i-garbage1/, Aug. 2002.Google Scholar
- C. J. Cheney. A nonrecursive list compacting algorithm. Communications of the ACM, 13(11):677--678, Nov. 1970. Google Scholar
Digital Library
- J. Cohen and A. Nicolau. Comparison of compacting algorithms for garbage collection. ACM Transactions on Programming Languages and Systems, 5(4):532--553, Oct. 1983. Google Scholar
Digital Library
- A. Demmers, M. Weiser, B. Hayes, H. Boehm, D. Bobrow, and S. Shenker. Combining generational and conservative garbage collection: framework and implementations. In ACM Symposium on the Principles of Programming Languages, pages 261--269, San Francisco, California, United States, 1990. ACM. Google Scholar
Digital Library
- D. Detlefs, C. Flood, S. Heller, and T. Printezis. Garbage-first garbage collection. In The ACM International Symposium on Memory Management, Vancouver, BC, Canada, Oct. 2004. ACM. Google Scholar
Digital Library
- T. Domani, E. K. Kolodner, and E. Petrank. A generational on-the-fly garbage collector for java. In PLDI ?00: Proceedings of the ACM SIGPLAN 2000 conference on Programming language design and implementation, pages 274--284, Vancouver, British Columbia, Canada, 2000. ACM. Google Scholar
Digital Library
- Q. Feng and E. Berger. A locality improving dynmaic memory allocator. In The ACM Workshop Memory Systems Performance, pages 68--77, Chicago, IL, June 2005. Google Scholar
Digital Library
- D. Frampton, D. F. Bacon, P. Cheng, and D. Grove. Generational realtime garbage collection: A a three-part invention for young obects. In European Conference on Object-Oriented Programming, pages 101--125, Berlin, Germany, July 2007. Google Scholar
Digital Library
- R. L. Hudson and J. E. B. Moss. Incremental collection of mature objects. In Proceedings of the International Workshop on Memory Management, number 637 in Lecture Notes on Computer Science, pages 388--403. Springer-Verlag, 1992. Google Scholar
Digital Library
- Jikes RVMCore Team. VMperformance comparisons. http://jikesrvm.anu.edu.au/~dacapo/index.php?category=release, 2007.Google Scholar
- H. Kermany and E. Petrank. The compressor: concurrent, incremental, and parallel compaction. In ACM Conference on Programming Language Design and Implementation, pages 354--363, Ottawa, Ontario, Canada, 2006. ACM. Google Scholar
Digital Library
- D. Lea. A memory allocator. Technical report, SUNY at Oswego, 1996.Google Scholar
- J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, Part I. Commun. ACM, 3(4):184--195, 1960. Google Scholar
Digital Library
- P. McGachey and A. L. Hosking. Reducing generational copy reserve overhead with fallback compaction. In The ACM International Symposium on Memory Management, pages 17--28, Ottawa, CA, June 2006. Google Scholar
Digital Library
- M. Pettersson. Linux Intel/x86 performance counters, 2003. http://user.it.uu.se/~mikpe/linux/perfctr/.Google Scholar
- N. Sachindran, J. E. B. Moss, and E. D. Berger. MC2: High-performance garbage collectionn for memory-constrained environments. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, pages 81--98, Vancouver, Canada, Oct. 2004. Google Scholar
Digital Library
- D. Spoonhower, G. Blelloch, and R. Harper. Using page residency to balance tradeoffs in tracing garbage collection. In ACM International Conference on Virtual Execution Environments, Chicago, IL, June 2005. ACM. Google Scholar
Digital Library
- Standard Performance Evaluation Corporation. SPECjbb2000 Documentation, release 1.01 edition, 2001.Google Scholar
- D. Stefanović, K. S. McKinley, and J. E. B. Moss. Age-based garbage collection. In ACM Conference on Object?Oriented Programming, Systems, Languages, and Applications, Denver, CO, Nov. 1999. Google Scholar
Digital Library
- P. Styger. LISP 2 garbage collector specifications. Technical Report TM-3417/500/00 1, System Development Cooperation, Santa Monica, CA, Apr. 1967.Google Scholar
Index Terms
Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance
Recommendations
Taking off the gloves with reference counting Immix
OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applicationsDespite some clear advantages and recent advances, reference counting remains a poor cousin to high-performance tracing garbage collectors. The advantages of reference counting include a) immediacy of reclamation, b) incrementality, and c) local scope ...
Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance
PLDI '08Programmers are increasingly choosing managed languages for modern applications, which tend to allocate many short-to-medium lived small objects. The garbage collector therefore directly determines program performance by making a classic space-time ...
Myths and realities: the performance impact of garbage collection
This paper explores and quantifies garbage collection behavior for three whole heap collectors and generational counterparts: copying semi-space, mark-sweep, and reference counting, the canonical algorithms from which essentially all other collection ...







Comments