skip to main content
research-article

Barriers reconsidered, friendlier still!

Published:15 June 2012Publication History
Skip Abstract Section

Abstract

Read and write barriers mediate access to the heap allowing the collector to control and monitor mutator actions. For this reason, barriers are a powerful tool in the design of any heap management algorithm, but the prevailing wisdom is that they impose significant costs. However, changes in hardware and workloads make these costs a moving target. Here, we measure the cost of a range of useful barriers on a range of modern hardware and workloads. We confirm some old results and overturn others. We evaluate the microarchitectural sensitivity of barrier performance and the differences among benchmark suites. We also consider barriers in context, focusing on their behavior when used in combination, and investigate a known pathology and evaluate solutions. Our results show that read and write barriers have average overheads as low as 5.4% and 0.9% respectively. We find that barrier overheads are more exposed on the workload provided by the modern DaCapo benchmarks than on old SPECjvm98 benchmarks. Moreover, there are differences in barrier behavior between in-order and out-of- order machines, and their respective memory subsystems, which indicate different barrier choices for different platforms. These changing costs mean that algorithm designers need to reconsider their design choices and the nature of their resulting algorithms in order to exploit the opportunities presented by modern hardware.

References

  1. 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Üno virtual machine. IBM System Journal, 39(1), Feb. 2000. doi: 10.1147/sj.391.0211. Google ScholarGoogle ScholarDigital LibraryDigital Library
  2. A. W. Appel. Simple generational garbage collection and fast allocation. Software: Practice and Experience, 19(2):171--183, Feb. 1989. doi: 10.1002/spe.4380190206. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. A. Azagury, E. K. Kolodner, E. Petrank, and Z. Yehudai. Combining card marking with remembered sets: How to save scanning time. In ACM International Symposium on Memory Management, pages 1 Indeed, Doug Lea has reported this pathology in his work on concurrent data structures for the java.util.concurrent library. 10--19, Vancouver, Canada, Oct. 1998. doi: 10.1145/286860. 286862. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. F. Bacon, P. Cheng, and V. T. Rajan. A real-time garbage collector with low overhead and consistent utilization. In Proceedings of the Thirtieth Annual ACM Symposium on the Principles of Programming Languages, pages 285--294, New Orleans, LA, Jan. 2003. doi: 10. 1145/604131.604155. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. S. M. Blackburn and A. Hosking. Barriers: Friend or foe? In ACM International Symposium on Memory Management, pages 143--151, Vancouver, Canada, Oct. 2004. doi: 10.1145/1029873. 1029891. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. S. M. Blackburn and K. S. McKinley. In or out? Putting write barriers in their place. In ACM International Symposium on Memory Management, pages 175--184, Berlin, Germany, June 2002. doi: 10.1145/ 512429.512452. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. S. M. Blackburn and K. S. McKinley. Immix: A mark-region garbage collector with space efficiency, fast collection, and mutator locality. In ACM Conference on Programming Language Design and Implementation, pages 22--32, Tuscon, AZ, June 2008. doi: 10.1145/ 1375581.1375586. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. M. Blackburn, M. Hirzel, R. Garner, and D. Stefanović. pjbb2005: The pseudoJBB benchmark. URL http://users.cecs.anu.edu.au/Üsteveb/research/research-infrastructure/pjbb2005.Google ScholarGoogle Scholar
  9. 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. doi: 10.1145/512529.512548. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. 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. doi: 10.1109/ICSE.2004. 1317436. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. 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 SIGPLAN Conference on Object-Oriented Programing, Systems, Languages, and Applications, pages 169--190, Oct. 2006. doi: 10.1145/1167515.1167488. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. R. A. Brooks. Trading data space for reduced time and code space in real-time garbage collection on stock hardware. In ACM Conference on Lisp and Functional Programming, pages 256--262, Austin, Texas, Aug. 1984. doi: 10.1145/800055.802042. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. P. J. Caudill and A. Wirfs-Brock. A third-generation Smalltalk-80 implementation. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 119--130, Portland, OR, Nov. 1986. doi: 10.1145/28697.28709. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. D. Dice. False sharing induced by card table marking, Feb. 2011. URL https://blogs.oracle.com/dave/entry/ false_sharing_induced_by_card.Google ScholarGoogle Scholar
  15. A. Fog. The microarchitecture of Intel, AMD and VIA CPUs. An optimization guide for assembly programmers and compiler makers. Copenhagen University College of Engineering, June 2011.Google ScholarGoogle Scholar
  16. L. Hellyer, R. E. Jones, and A. L. Hosking. The locality of concurrent write barriers. In ACM International Symposium on Memory Management, pages 83--92, Toronto, Canada, June 2010. doi: 10.1145/1806651.1806666. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. M. Hirzel, A. Diwan, and M. Hertz. Connectivity-based garbage collection. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 359--373, Anaheim, California, Nov. 2003. doi: 10.1145/949305.949337. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. L. Hosking and R. L. Hudson. Remembered sets can also play cards. In J. E. B. Moss, P. R. Wilson, and B. Zorn, editors, OOPSLA Workshop on Garbage Collection in Object-Oriented Systems, Oct. 1993. URL ftp://ftp.cs.utexas.edu/pub/garbage/GC93/hosking.ps.Google ScholarGoogle Scholar
  19. A. L. Hosking and J. E. B. Moss. Protection traps and alternatives for memory management of an object-oriented language. In Proceedings of the Fourteenth ACM Symposium on Operating Systems Principles, pages 106--119, Asheville, North Carolina, Dec. 1993. doi: 10. 1145/168619.168628. Google ScholarGoogle ScholarDigital LibraryDigital Library
  20. A. L. Hosking, J. E. B. Moss, and D. Stefanović. A comparative performance evaluation of write barrier implementations. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 92--109, Vancouver, Canada, Oct. 1992. doi: 10.1145/141936.141946. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. P. Sobalvarro. A lifetime-based garbage collector for Lisp systems on general-purpose computers. Technical Report AITR-1417, MIT AI Lab, Feb. 1988. Bachelor's thesis. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. SPEC. SPECjvm98, Release 1.03. Standard Performance Evaluation Corporation, Mar. 1999. URL http://www.spec.org/jvm98.Google ScholarGoogle Scholar
  23. SPEC. SPECjbb2005 (Java Server Benchmark), Release 1.07. Standard Performance Evaluation Corporation, 2006. URL http://www.spec.org/jbb2005.Google ScholarGoogle Scholar
  24. D. M. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In ACM Software Engineering Symposium on Practical Software Development Environments, pages 157--167, Apr. 1984. doi: 10.1145/800020.808261. Google ScholarGoogle ScholarDigital LibraryDigital Library
  25. P. R. Wilson and T. G. Moher. A card-marking scheme for controlling intergenerational references in generation-based garbage collection on stock hardware. ACM SIGPLAN Notices, 24(5):87--92, May 1989. doi: 10.1145/66068.66077. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. B. Zorn. Barrier methods for garbage collection. Technical Report CU-CS-494-90, University of Colorado, Boulder, Nov. 1990.Google ScholarGoogle Scholar

Index Terms

  1. Barriers reconsidered, friendlier still!

    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 47, Issue 11
      ISMM '12
      November 2012
      136 pages
      ISSN:0362-1340
      EISSN:1558-1160
      DOI:10.1145/2426642
      Issue’s Table of Contents
      • cover image ACM Conferences
        ISMM '12: Proceedings of the 2012 international symposium on Memory Management
        June 2012
        152 pages
        ISBN:9781450313506
        DOI:10.1145/2258996

      Copyright © 2012 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 15 June 2012

      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!