Abstract

Despite 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 of its operations. After decades of languishing with hopelessly bad performance, recent work narrowed the gap between reference counting and the fastest tracing collectors to within 10%. Though a major advance, this gap remains a substantial barrier to adoption in performance-conscious application domains.
Our work identifies heap organization as the principal source of the remaining performance gap. We present the design, implementation, and analysis of a new collector, RC Immix, that replaces reference counting's traditional free-list heap organization with the line and block heap structure introduced by the Immix collector. The key innovations of RC Immix are 1) to combine traditional reference counts with per-line live object counts to identify reusable memory and 2) to eliminate fragmentation by integrating copying with reference counting of new objects and with backup tracing cycle collection. In RC Immix, reference counting offers efficient collection and the line and block heap organization delivers excellent mutator locality and efficient allocation. With these advances, RC Immix closes the 10% performance gap, matching the performance of a highly tuned production generational collector. By removing the performance barrier, this work transforms reference counting into a serious alternative for meeting high performance objectives for garbage collected languages.
- B. Alpern, S. Augart, S. M. Blackburn, M. Butrico, A. Cocchi, P. Cheng, J. Dolby, S. J. Fink, D. Grove, M. Hind, K. S. McKinley, M. Mergen, J. E. B. Moss, T. Ngo, V. Sarkar, and M. Trapp. The Jikes RVM Project: Building an open source research community. phIBM System Journal, 44 (2): 399--418, 2005. 10.1147/sj.442.0399. Google Scholar
Digital Library
- D. F. Bacon and V. T. Rajan. Concurrent cycle collection in reference counted systems. In phEuropean Conference on Object-Oriented Programming, Budapest, Hungary, June 18 - 22, 2001, pages 207--235. LNCS, 2001. ISBN 3--540--42206--4. 10.1007/3--540--45337--7_12. Google Scholar
Digital Library
- D. F. Bacon, C. R. Attanasio, H. B. Lee, V. T. Rajan, and S. Smith. Java without the coffee breaks: A nonintrusive multiprocessor garbage collector. In phACM Conference on Programming Language Design and Implementation, PLDI'01, Snowbird, UT, USA, June 2001, pages 92--103. ACM, 2001. 10.1145/378795.378819. Google Scholar
Digital Library
- E. D. Berger, B. G. Zorn, and K. S. McKinley. Composing high-performance memory allocators. In phACM Conference on Programming Language Design and Implementation, PLDI'01, Snowbird, UT, USA, June 2001, pages 114--124. ACM, 2001. 10.1145/378795.378821. Google Scholar
Digital Library
- S. M. Blackburn and K. S. McKinley. Ulterior reference counting: Fast garbage collection without a long wait. In phACM Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA'03, Anaheim, CA, USA, Oct, 2003, pages 344--358. ACM, 2003. 10.1145/949305.949336. Google Scholar
Digital Library
- S. M. Blackburn and K. S. McKinley. Immix: A mark-region garbage collector with space efficiency, fast collection, and mutator locality. In phACM Conference on Programming Language Design and Implementation, PLDI'08, Tucson, AZ, USA, June 2008, pages 22--32. ACM, 2008. 10.1145/1379022.1375586. 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 phThe 26th International Conference on Software Engineering, ICSE'04, Edinburgh, Scotland, 2004, pages 137--146. ACM/IEEE, 2004. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In phSIGMETRICS -- Performance 2004, Joint International Conference on Measurement and Modeling of Computer Systems, New York, NY, USA, June 12--16, 2004, pages 25--36. ACM, 2004\natexlabb. 10.1145/1005686.1005693. Google Scholar
Digital Library
- PJBB:05S. M. Blackburn, M. Hirzel, R. Garner, and D. Stefanović. pjbb2005: The pseudojbb benchmark, 2005. URL http://users.cecs.anu.edu.au/ steveb/research/research-infrastructure/pjbb2005.Google Scholar
- VanDrunen, von Dincklage, and Wiedermann}BGHGoogle Scholar
- :06S. M. Blackburn, R. Garner, C. Hoffmann, 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 phACM Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA'06, Portland, OR, USA, Oct, 2006, pages 169--190. ACM, 2006. 10.1145/1167473.1167488. Google Scholar
Digital Library
- S. M. Blackburn, K. S. McKinley, R. Garner, C. Hoffman, A. M. Khan, 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. Wake Up and Smell the Coffee: Evaluation Methodology for the 21st Century. phCommun. ACM, 51 (8): 83--89, Aug. 2008. Google Scholar
Digital Library
- T. Cao, , S. M. Blackburn, T. Gao, and K. S. McKinley. The yin and yang of power and performance for asymmetric hardware and managed software. In phThe 39th International Conference on Computer Architecture, ISCA'12, Portland, OR, June, 2012, pages 225--236. ACM/IEEE, 2012. 10.1145/2366231.2337185. Google Scholar
Digital Library
- C. J. Cheney. A nonrecursive list compacting algorithm. phCommun. ACM, 13 (11): 677--678, Nov. 1970. 10.1145/362790.362798. Google Scholar
Digital Library
- G. E. Collins. A method for overlapping and erasure of lists. phCommun. ACM, 3 (12): 655--657, December 1960. 10.1145/367487.367501. 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 phACM Symposium on the Principles of Programming Languages, POPL'90, San Francisco, CA, USA, pages 261--269. ACM, 1990. 10.1145/96709.96735. Google Scholar
Digital Library
- L. P. Deutsch and D. G. Bobrow. An efficient, incremental, automatic garbage collector. phCommun. ACM, 19 (9): 522--526, September 1976. 10.1145/360336.360345. Google Scholar
Digital Library
- Y. Feng and E. D. Berger. A locality-improving dynamic memory allocator. In phProceedings of the 2005 Workshop on Memory System Performance, pages 68--77, 2005. 10.1145/1111583.1111594. Google Scholar
Digital Library
- D. Frampton. phGarbage Collection and the Case for High-level Low-level Programming. PhD thesis, Australian National University, June 2010. URL http://cs.anu.edu.au/ Daniel.Frampton/DanielFrampton_Thesis_Jun2010.pdf.Google Scholar
- I. Jibaja, S. M. Blackburn, M. R. Haghighat, and K. S. McKinley. Deferred gratification: Engineering for high performance garbage collection from the get go. In phProceedings of the 2011 ACM SIGPLAN Workshop on Memory Systems Performance and Correctness (MSPC 2011), San Jose, CA, June 5, 2011. ACM, 2011. 10.1145/1988915.1988930. Google Scholar
Digital Library
- R. E. Jones, A. Hosking, and J. E. B. Moss. phThe Garbage Collection Handbook: The Art of Automatic Memory Management. Chapman and Hall/CRC Applied Algorithms and Data Structures Series, USA, 2011. URL http://gchandbook.org/. Google Scholar
Digital Library
- Y. Levanoni and E. Petrank. An on-the-fly reference counting garbage collector for Java. In phACM Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA'01, Tampa, FL, USA, Oct, 2001, pages 367--380. ACM, 2001. 10.1145/504282.504309. Google Scholar
Digital Library
- Y. Levanoni and E. Petrank. An on-the-fly reference-counting garbage collector for Java. phACM Trans. Prog. Lang. Syst., 28 (1): 1--69, January 2006. 10.1145/1111596.1111597. Google Scholar
Digital Library
- H. Lieberman and C. Hewitt. A real-time garbage collector based on the lifetimes of objects. phCommun. ACM, 26 (6): 419--429, June 1983. 10.1145/358141.358147. Google Scholar
Digital Library
- J. McCarthy. Recursive functions of symbolic expressions and their computation by machine, part I. phCommun. ACM, 3 (4): 184--195, April 1960. 10.1145/367177.367199. Google Scholar
Digital Library
- H. Paz, E. Petrank, and S. M. Blackburn. Age-oriented concurrent garbage collection. In phCompiler Construction, volume 3443 of phLecture Notes in Computer Science, pages 121--136. Springer Berlin Heidelberg, 2005. ISBN 978--3--540--25411--9. 10.1007/978--3--540--31985--6_9. Google Scholar
Digital Library
- Y. Seeley. JIRA issue LUCENE-1800: QueryParser should use reusable token streams, 2009. URL https://issues.apache.org/jira/browse/LUCENE-1800.Google Scholar
- R. Shahriyar, S. M. Blackburn, and D. Frampton. Down for the count? Getting reference counting back in the ring. In phProceedings of the 11th International Symposium on Memory Management, ISMM 2012, Beijing, China, June 15 - 16, 2012. ACM, 2012. 10.1145/2258996.2259008. Google Scholar
Digital Library
- 98, Release 1.03. Standard Performance Evaluation Corporation, Mar. 1999. URL http://www.spec.org/jvm98.Google Scholar
- (Java Server Benchmark), Release 1.07. Standard Performance Evaluation Corporation, 2006. URL http://www.spec.org/jbb2005.Google Scholar
- D. Ungar. Generation Scavenging: A non-disruptive high performance storage reclamation algorithm. In phProceedings of the first ACM SIGSOFT/SIGPLAN software engineering symposium on Practical software development environments, SDE 1, 1984, pages 157--167. ACM, 1984. ISBN 0--89791--131--8. 10.1145/800020.808261. Google Scholar
Digital Library
- J. Weizenbaum. Recovery of reentrant list structures in Lisp. phCommun. ACM, 12 (7): 370--372, July 1969. 10.1145/363156.363159. Google Scholar
Digital Library
- P. R. Wilson, M. S. Johnstone, M. Neely, and D. Boles. Dynamic storage allocation: A survey and critical review. In phIWMM'95, Proceedings of the International Workshop on Memory Management, IWMM, Kinross, Scotland, UK, Sep 27--29, 1995, volume 986 of phLecture Notes in Computer Science, pages 1--116. Springer Berlin Heidelberg, 2005. 10.1007/3--540--60368--9_19. Google Scholar
Digital Library
- X. Yang, S. M. Blackburn, D. Frampton, J. B. Sartor, and K. S. McKinley. Why nothing matters: The impact of zeroing. In phACM Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA'11, Portland, Oregon, USA, Oct, 2011, pages 307--324. ACM, 2011. 10.1145/2048066.2048092. Google Scholar
Digital Library
- T. Yuasa, Y. Nakagawa, T. Komiyay, and M. Yasugiy. Return barrier. In phProceedings of the International Lisp Conference, 2002.Google Scholar
Index Terms
Taking off the gloves with reference counting Immix
Recommendations
Fast conservative garbage collection
OOPSLA '14: Proceedings of the 2014 ACM International Conference on Object Oriented Programming Systems Languages & ApplicationsGarbage collectors are exact or conservative. An exact collector identifies all references precisely and may move referents and update references, whereas a conservative collector treats one or more of stack, register, and heap references as ambiguous. ...
Down for the count? Getting reference counting back in the ring
ISMM '12: Proceedings of the 2012 international symposium on Memory ManagementReference counting and tracing are the two fundamental approaches that have underpinned garbage collection since 1960. However, despite some compelling advantages, reference counting is almost completely ignored in implementations of high performance ...
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 ...







Comments