A Comparative Evaluation of Parallel Garbage Collector Implementations

  • Clement R. Attanasio
  • David F. Bacon
  • Anthony Cocchi
  • Stephen Smith
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 2624)


While uniprocessor garbage collection is relatively well understood, experience with collectors for large multiprocessor servers is limited and it is unknown which techniques best scale with large memories and large numbers of processors. In order to explore these issues we designed a modular garbage collection framework in the IBM Jalapeño Java virtual machine and implemented five different parallel garbage collectors: non-generational and generational versions of mark-and-sweep and semi-space copying collectors, as well as a hybrid of the two. We describe the optimizations necessary to achieve good performance across all of the collectors, including load balancing, fast synchronization, and inter-processor sharing of free lists. We then quantitatively compare the different collectors to find their asymptotic performance both with respect to how fast they can run applications as well as how little memory they can run them in. All of our collectors scale linearly up to sixteen processors. The least memory is usually required by the hybrid mark-sweep collector that uses a copying collector for its nursery, although sometimes the non-generational mark-sweep collector requires less memory. The fastest execution is more application-dependent. Our only application with a large working set performed best using the mark-sweep collector; with one exception, the rest of the applications ran fastest with one of the generational collectors.


Virtual Machine Garbage Collection Java Virtual Machine Garbage Collector Virtual Processor 
These keywords were added by machine and not by the authors. This process is experimental and the keywords may be updated as the learning algorithm improves.


Unable to display preview. Download preview PDF.

Unable to display preview. Download preview PDF.


  1. [1]
    Alpern, B., et al. Implementing Jalapeño in Java. In Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages, and Applications (Oct. 1999). SIGPLAN Notices, 34, 10, 314–324.Google Scholar
  2. [2]
    Alpern, B., et al. The Jalapeño virtual machine. IBM Syst. J. 39,1 (2000), 211–238.CrossRefGoogle Scholar
  3. [3]
    Arnold, M., Fink, S., Grove, D., M. Hind, AND Sweeney, P. Adaptive optimization in the Jalapeño JVM. In Proc. of the ACM Conf. on Object-Oriented Programming, Systems, Languages, and Applications (Oct. 2000). SIGPLAN Notices, 35, 10.Google Scholar
  4. [4]
    Boehm, H.-J. Fast multiprocessor memory allocation and garbage collection. Tech. Rep. HPL-2000-165, Hewlett-Packard Laboratories, Dec. 2000.Google Scholar
  5. [5]
    Boehm, H.-J., and Weiser, M. Garbage collection in an uncooperative environment. Software — Practice and Experience 18,9 (1988), 807–820.CrossRefGoogle Scholar
  6. [6]
    Crammond, J. A garbage collection algorithm for shared memory parallel processors. International Journal Of Parallel Programming 17,6 (1988), 497–522.CrossRefGoogle Scholar
  7. [7]
    Endo, T., Taura, K., and Yonezawa, A. A scalable mark-sweep garbage collector on large-scale shared-memory machines. In Proc. of Supercomputing’ 97 (San Jose, California, Nov. 1997), IEEE Computer Society Press, Los Alamitos, California.Google Scholar
  8. [8]
    Fitzgerald, R., and Tarditi, D. The case for profile-directed selection of garbage collectors. In ISMM [12], pp. 111–120.Google Scholar
  9. [9]
    Flood, C. H., Detlefs, D., Shavit, N., and Zhang, X. Parallel garbage collection for shared memory multiprocessors. In Proceedings of the Usenix Java Virtual Machine Research and Technology Symposium (Monterey, California, Apr. 2001).Google Scholar
  10. [10]
    Halstead, R. H. Multilisp: A language for concurrent symbolic computation. ACM Trans. Program. Lang. Syst. 7,4 (Oct. 1985), 501–538.zbMATHCrossRefGoogle Scholar
  11. [11]
    Herlihy, M., and Moss, J. E. B. Lock-free garbage collection for multiprocessors. IEEE Transactions on Parallel and Distributed Systems 3,3 (May 1992).Google Scholar
  12. [12]
    Proceedings of the ACM SIGPLAN International Symposium on Memory Management (Minneapolis, MN, Oct. 2000), SIGPLAN Notices 36, 1.Google Scholar
  13. [13]
    Küchlin, W. A space-efficient parallel garbage collection algorithm. In Proceedings of Fifth ACM International Conference on Supercomputing (June 1991), pp. 40–46.Google Scholar
  14. [14]
    Printezis, T., and Detlefs, D. A generational mostly-concurrent garbage collector. In ISMM [12], pp. 143–154.Google Scholar

Copyright information

© Springer-Verlag Berlin Heidelberg 2003

Authors and Affiliations

  • Clement R. Attanasio
    • 1
  • David F. Bacon
    • 1
  • Anthony Cocchi
    • 1
  • Stephen Smith
    • 1
  1. 1.IBM T.J. Watson Research CenterYorktown HeightsUSA

Personalised recommendations