Abstract
At the heart of all garbage collectors lies the process of identifying and processing reference fields within an object. Despite its key role, and evidence of many different implementation approaches, to our knowledge no comprehensive quantitative study of this design space exists. The lack of such a study means that implementers must rely on `conventional wisdom', hearsay, and their own costly analysis. Starting with mechanisms described in the literature and a variety of permutations of these, we explore the impact of a number of dimensions including: a) the choice of data structure, b) levels of indirection from object to metadata, and c) specialization of scanning code. We perform a comprehensive examination of these tradeoffs on four different architectures using eighteen benchmarks and hardware performance counters. We inform the choice of mechanism with a detailed study of heap composition and object structure as seen by the garbage collector on these benchmarks. Our results show that choice of scanning mechanism is important. We find that a careful choice of scanning mechanism alone can improve garbage collection performance by 16% and total time by 2.5%, on average, over a well tuned baseline. We observe substantial variation in performance among architectures, and find that some mechanisms--particularly specialization, layout of reference fields in objects, and encoding metadata in object headers--yield consistent, significant advantages.
- B. Alpern et al. The Jalapeño virtual machine. IBM Systems Journal, 39(1):211--238, February 2000. Google Scholar
Digital Library
- M. Arnold, S. J. Fink, D. Grove, M. Hind, and P. Sweeney. Adaptive optimization in the Jalapeño JVM. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, pages 47--65, Minneapolis, MN, October 2000. Google Scholar
Digital Library
- S. M. Blackburn, P. Cheng, and K. S. McKinley. Myths and realities: The performance impact of garbage collection. In ACM SIGMETRICS 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 ICSE 2004, 26th International Conference on Software Engineering, 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, New York, NY, USA, Oct. 2006. ACM Press. Google Scholar
Digital Library
- H.-J. Boehm. Space efficient conservative garbage collection. In PLDI '93: Proceedings of the ACM SIGPLAN 1993 conference on Programming language design and implementation, pages 197--206, New York, NY, USA, 1993. ACM Press. Google Scholar
Digital Library
- H.-J. Boehm and M. Weiser. Garbage collection in an uncooperative environment. Softw. Pract. Exper., 18(9):807--820, 1988. Google Scholar
Digital Library
- E. Gagnon. A Portable Research Framework for the Execution of Java Bytecode. PhD thesis, McGill University, Montreal, 2002. Google Scholar
Digital Library
- E. Gagnon and L. Hendren. SableVM: A research framework for the efficient execution of Java bytecode. In Proceedings of the 1st Java Virtual Machine Research and Technology Symposium, April 23-24, Monterey, CA, USA, pages 27--40. USENIX, Apr. 2001. Google Scholar
Digital Library
- R. Garner, S. M. Blackburn, and D. Frampton. Effective prefetch for mark-sweep garbage collection. In The 2007 International Symposium on Memory Management. ACM Press, Oct. 2007. Google Scholar
Digital Library
- A. Georges, D. Buytaert, and L. Eeckhout. Statistically rigorous java performance evaluation. In ACM Conference on Object-Oriented Programming Systems, Languages, and Applications, OOPSLA '07, pages 57--76, New York, NY, USA, 2007. ACM. Google Scholar
Digital Library
- D. Grove and P. Cheng. Private communication, 2005.Google Scholar
- D. Gu, C. Verbrugge, and E. M. Gagnon. Relative factors in performance analysis of Java virtual machines. In VEE '06: Proceedings of the Second International Conference on Virtual Execution Environments, pages 111--121, New York, NY, USA, 2006. ACM Press. Google Scholar
Digital Library
- R. Jones and R. Lins. Garbage Collection: Algorithms for Automatic Dynamic Memory Management. John Wiley and Sons, 1996. Google Scholar
Digital Library
- P. Sansom. Dual-mode garbage collection. In H. Glaser and P. H. Hartel, editors, Proceedings of the Workshop on the Parallel Implementation of Functional Languages, pages 283--310, Southampton, UK, 1991. Department of Electronics and Computer Science, University of Southampton.Google Scholar
- Standard Performance Evaluation Corporation. SPECjvm98 Documentation, release 1.03 edition, March 1999.Google Scholar
- Standard Performance Evaluation Corporation. SPECjbb2000 (Java Business Benchmark) Documentation, release 1.01 edition, 2001.Google Scholar
Index Terms
A comprehensive evaluation of object scanning techniques
Recommendations
Mark-copy: fast copying GC with less space overhead
OOPSLA '03: Proceedings of the 18th annual ACM SIGPLAN conference on Object-oriented programing, systems, languages, and applicationsCopying garbage collectors have a number of advantages over non-copying collectors, including cheap allocation and avoiding fragmentation. However, in order to provide completeness (the guarantee to reclaim each garbage object eventually), standard ...
Mark-copy: fast copying GC with less space overhead
Special Issue: Proceedings of the OOPSLA '03 conferenceCopying garbage collectors have a number of advantages over non-copying collectors, including cheap allocation and avoiding fragmentation. However, in order to provide completeness (the guarantee to reclaim each garbage object eventually), standard ...
MC2: high-performance garbage collection for memory-constrained environments
OOPSLA '04: Proceedings of the 19th annual ACM SIGPLAN conference on Object-oriented programming, systems, languages, and applicationsJava is becoming an important platform for memory-constrained consumer devices such as PDAs and cellular phones, because it provides safety and portability. Since Java uses garbage collection, efficient garbage collectors that run in constrained memory ...







Comments