skip to main content
research-article

Taking off the gloves with reference counting Immix

Published:29 October 2013Publication History
Skip Abstract Section

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.

References

  1. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  2. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  3. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  4. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  5. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  6. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  8. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  9. 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 ScholarGoogle Scholar
  10. VanDrunen, von Dincklage, and Wiedermann}BGHGoogle ScholarGoogle Scholar
  11. :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 ScholarGoogle ScholarDigital LibraryDigital Library
  12. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  13. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  14. C. J. Cheney. A nonrecursive list compacting algorithm. phCommun. ACM, 13 (11): 677--678, Nov. 1970. 10.1145/362790.362798. Google ScholarGoogle ScholarDigital LibraryDigital Library
  15. G. E. Collins. A method for overlapping and erasure of lists. phCommun. ACM, 3 (12): 655--657, December 1960. 10.1145/367487.367501. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  17. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  18. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  19. 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 ScholarGoogle Scholar
  20. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  21. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  22. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  23. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  24. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  25. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  26. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  27. Y. Seeley. JIRA issue LUCENE-1800: QueryParser should use reusable token streams, 2009. URL https://issues.apache.org/jira/browse/LUCENE-1800.Google ScholarGoogle Scholar
  28. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  29. 98, Release 1.03. Standard Performance Evaluation Corporation, Mar. 1999. URL http://www.spec.org/jvm98.Google ScholarGoogle Scholar
  30. (Java Server Benchmark), Release 1.07. Standard Performance Evaluation Corporation, 2006. URL http://www.spec.org/jbb2005.Google ScholarGoogle Scholar
  31. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  32. J. Weizenbaum. Recovery of reentrant list structures in Lisp. phCommun. ACM, 12 (7): 370--372, July 1969. 10.1145/363156.363159. Google ScholarGoogle ScholarDigital LibraryDigital Library
  33. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  34. 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 ScholarGoogle ScholarDigital LibraryDigital Library
  35. T. Yuasa, Y. Nakagawa, T. Komiyay, and M. Yasugiy. Return barrier. In phProceedings of the International Lisp Conference, 2002.Google ScholarGoogle Scholar

Index Terms

  1. Taking off the gloves with reference counting Immix

Recommendations

Comments

Login options

Check if you have access through your login credentials or your institution to get full access on this article.

Sign in

Full Access

  • Published in

    cover image ACM SIGPLAN Notices
    ACM SIGPLAN Notices  Volume 48, Issue 10
    OOPSLA '13
    October 2013
    867 pages
    ISSN:0362-1340
    EISSN:1558-1160
    DOI:10.1145/2544173
    Issue’s Table of Contents
    • cover image ACM Conferences
      OOPSLA '13: Proceedings of the 2013 ACM SIGPLAN international conference on Object oriented programming systems languages & applications
      October 2013
      904 pages
      ISBN:9781450323741
      DOI:10.1145/2509136

    Copyright © 2013 ACM

    Publisher

    Association for Computing Machinery

    New York, NY, United States

    Publication History

    • Published: 29 October 2013

    Check for updates

    Qualifiers

    • research-article

PDF Format

View or Download as a PDF file.

PDF

eReader

View online with eReader.

eReader
About Cookies On This Site

We use cookies to ensure that we give you the best experience on our website.

Learn more

Got it!