skip to main content
10.1145/1806596.1806649acmconferencesArticle/Chapter ViewAbstractPublication PagespldiConference Proceedingsconference-collections
research-article

Z-rays: divide arrays and conquer speed and flexibility

Published:05 June 2010Publication History

ABSTRACT

Arrays are the ubiquitous organization for indexed data. Throughout programming language evolution, implementations have laid out arrays contiguously in memory. This layout is problematic in space and time. It causes heap fragmentation, garbage collection pauses in proportion to array size, and wasted memory for sparse and over-provisioned arrays. Because of array virtualization in managed languages, an array layout that consists of indirection pointers to fixed-size discontiguous memory blocks can mitigate these problems transparently. This design however incurs significant overhead, but is justified when real-time deadlines and space constraints trump performance.

This paper proposes z-rays, a discontiguous array design with flexibility and efficiency. A z-ray has a spine with indirection pointers to fixed-size memory blocks called arraylets, and uses five optimizations: (1) inlining the first N array bytes into the spine, (2) lazy allocation, (3) zero compression, (4) fast array copy, and (5) arraylet copy-on-write. Whereas discontiguous arrays in prior work improve responsiveness and space efficiency, z-rays combine time efficiency and flexibility. On average, the best z-ray configuration performs within 12.7% of an unmodified Java Virtual Machine on 19 benchmarks, whereas previous designs have two to three times higher overheads. Furthermore, language implementers can configure z-ray optimizations for various design goals. This combination of performance and flexibility creates a better building block for past and future array optimization.

References

  1. AICAS. Jamaica VM. http://www.aicas.com/.Google ScholarGoogle Scholar
  2. 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 Jalapeno virtual machine. IBM Systems Journal, 39(1): 211--238, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  3. C. S. Ananian and M. Rinard. Data size optimizations for Java programs. In Languages, Compiler, and Tool Support for Embedded Systems (LCTES), pages 59--68, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  4. D. Bacon, P. Cheng, and V. T. Rajan. Controlling fragmentation and space consumption in the Metronome, a real-time garbage collector for Java. In Languages, Compiler, and Tool Support for Embedded Systems (LCTES), pages 81--92, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  5. D. Bacon, P. Cheng, and V. T. Rajan. A real-time garbage collector with low overhead and consistent utilization. In Principles of Programming Languages (POPL), pages 285--298, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  6. E. Berger, K. McKinley, R. Blumofe, and P. Wilson. Hoard: A scalable memory allocator for multithreaded applications. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 117--128, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  7. 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. Stefanovic, T. VanDrunen, D. von Dincklage, and B. Wiedermann. The DaCapo benchmarks: Java benchmarking development and analysis. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 169--190, 2006. Google ScholarGoogle ScholarDigital LibraryDigital Library
  8. S. M. Blackburn and A. L. Hosking. Barriers: Friend or foe? In International Symposium on Memory Management (ISMM), pages 143--151, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  9. S. M. Blackburn and K. S. McKinley. In or out? Putting write barriers in their place. In International Symposium on Memory Management (ISMM), pages 175--184, 2002. Google ScholarGoogle ScholarDigital LibraryDigital Library
  10. S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and Realities: The Performance Impact of Garbage Collection. In Measurement and Modeling of Computer Systems (SIGMETRICS), pages 25--36, 2004. Google ScholarGoogle ScholarDigital LibraryDigital Library
  11. R. Bod1k, R. Gupta, and V. Sarkar. ABCD: eliminating array bounds checks on demand. In Programming Language Design and Implementation (PLDI), pages 321--333, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  12. G. Chen, M. Kandemir, N. Vijaykrishnan, M. J. Irwin, B. Mathiske, and M. Wolczko. Heap compression for memory-constrained Java environments. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 282--301, 2003. Google ScholarGoogle ScholarDigital LibraryDigital Library
  13. C. Click, G. Tene, and M. Wolf. The pauseless GC algorithm. In Virtual Execution Environments (VEE), pages 46--56, 2005. Google ScholarGoogle ScholarDigital LibraryDigital Library
  14. Fiji Systems LLC. Fiji VM. http://www.fiji-systems.com/.Google ScholarGoogle Scholar
  15. R. Fitzgerald and D. Tarditi. The case for profile-directed selection of garbage collectors. In International Symposium on Memory Management (ISMM), pages 111--120, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  16. D. Frampton, S. M. Blackburn, P. Cheng, R. J. Garner, D. Grove, J. E. B. Moss, and S. I. Salishev. Demystifying magic: High-level low-level programming. In Virtual Execution Environments (VEE), pages 81--90, 2009. Google ScholarGoogle ScholarDigital LibraryDigital Library
  17. T. Harris, S. Tomic, A. Cristal, and O. Unsal. Dynamic filtering: Multi-purpose architecture support for language runtime systems. In Architectural Support for Programming Languages and Operating Systems (ASPLOS), pages 39--52, 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  18. A. L. Hosking, J. E. B. Moss, and D. Stefanovic. A comparative performance evaluation of write barrier implementations. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 92--109, 1992. Google ScholarGoogle ScholarDigital LibraryDigital Library
  19. IBM. Websphere real time. http://www-01.ibm.com/software/webservers/realtime/.Google ScholarGoogle Scholar
  20. K. Ishizaki and et al. Design, implementation, and evaluation of optimizations in a just-in-time compiler. In Java Grande, pages 119--128, 1999. Google ScholarGoogle ScholarDigital LibraryDigital Library
  21. H. Lieberman and C. E. Hewitt. A real time garbage collector based on the lifetimes of objects. Communications of the ACM (CACM), 26(6):419--429, 1983. Google ScholarGoogle ScholarDigital LibraryDigital Library
  22. N. Mitchell and G. Sevitsky. The causes of bloat, the limits of health. In Object-Oriented Programming, Systems, Languages, and Applications (OOPSLA), pages 245--260, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  23. N. Nethercote and J. Seward. Valgrind: A framework for heavyweight dynamic binary instrumentation. In Programming Language Design and Implementation (PLDI), pages 89--100, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library
  24. F. Pizlo. Private communication, 2010.Google ScholarGoogle Scholar
  25. F. Pizlo, L. Ziarek, P. Maj, A. Hosking, E. Blanton, and J. Vitek. Schism: Fragmentaton-tolerant real-time garbage collection. In Programming Language Design and Implementation (PLDI), 2010. Google ScholarGoogle ScholarDigital LibraryDigital Library
  26. J. S. Quarterman, A. Silberschatz, and J. L. Peterson. 4.2BSD and 4.3BSD as examples of the UNIX system. ACM Computing Surveys, 17(4):379--418, 1985. Google ScholarGoogle ScholarDigital LibraryDigital Library
  27. J. B. Sartor, M. Hirzel, and K. S. McKinley. No bit left behind: The limits of heap data compression. In International Symposium on Memory Management (ISMM), pages 111--120, 2008. Google ScholarGoogle ScholarDigital LibraryDigital Library
  28. F. Siebert. Eliminating external fragmentation in a non-moving garbage collector for Java. In Compilers, Architectures, and Synthesis for Embedded Systems (CASES), pages 9--17, 2000. Google ScholarGoogle ScholarDigital LibraryDigital Library
  29. SPEC corporation. SPECjbb2005 Java server benchmark, 2005. ftp://ftp.spec.org/jbb2005/.Google ScholarGoogle Scholar
  30. D. Ungar. Generation scavenging: A non-disruptive high performance storage reclamation algorithm. In Software Engineering Symposium on Practical Software Development Environments (SESPSDE), pages 157--167, 1984. Google ScholarGoogle ScholarDigital LibraryDigital Library
  31. C. Zilles. Accordion arrays: Selective compression of unicode arrays in Java. In International Symposium on Memory Management (ISMM), pages 55--66, 2007. Google ScholarGoogle ScholarDigital LibraryDigital Library

Index Terms

  1. Z-rays: divide arrays and conquer speed and flexibility

    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
    • Published in

      cover image ACM Conferences
      PLDI '10: Proceedings of the 31st ACM SIGPLAN Conference on Programming Language Design and Implementation
      June 2010
      514 pages
      ISBN:9781450300193
      DOI:10.1145/1806596
      • cover image ACM SIGPLAN Notices
        ACM SIGPLAN Notices  Volume 45, Issue 6
        PLDI '10
        June 2010
        496 pages
        ISSN:0362-1340
        EISSN:1558-1160
        DOI:10.1145/1809028
        Issue’s Table of Contents

      Copyright © 2010 ACM

      Publisher

      Association for Computing Machinery

      New York, NY, United States

      Publication History

      • Published: 5 June 2010

      Permissions

      Request permissions about this article.

      Request Permissions

      Check for updates

      Qualifiers

      • research-article

      Acceptance Rates

      Overall Acceptance Rate406of2,067submissions,20%

    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!