Myths and realities: The performance impact of garbage collection

Stephen M. Blackburn*, Perry Cheng, Kathryn S. McKinley

*Corresponding author for this work

    Research output: Contribution to journalConference articlepeer-review

    161 Citations (Scopus)

    Abstract

    This paper explores and quantifies garbage collection behavior for three whole heap collectors and generational counterparts: copying semi-space, mark-sweep, and reference counting, the canonical algorithms from which essentially all other collection algorithms are derived. Efficient implementations in MMTk, a Java memory management toolkit, in IBM's Jikes RVM share all common mechanisms to provide a clean experimental platform. Instrumentation separates collector and program behavior, and performance counters measure timing and memory behavior on three architectures. Our experimental design reveals key algorithmic features and how they match program characteristics to explain the direct and indirect costs of garbage collection as a function of heap size on the SPEC JVM benchmarks. For example, we find that the contiguous allocation of copying collectors attains significant locality benefits over free-list allocators. The reduced collection costs of the generational algorithms together with the locality benefit of contiguous allocation motivates a copying nursery for newly allocated objects. These benefits dominate the overheads of generational collectors compared with non-generational and no collection, disputing the myth that "no garbage collection is good garbage collection." Performance is less sensitive to the mature space collection algorithm in our benchmarks. However the locality and pointer mutation characteristics for a given program occasionally prefer copying or mark-sweep. This study is unique in its breadth of garbage collection algorithms and its depth of analysis.

    Original languageEnglish
    Pages (from-to)25-36
    Number of pages12
    JournalPerformance Evaluation Review
    Volume32
    Issue number1
    DOIs
    Publication statusPublished - 2004
    EventSIGMETRICS 2004/Performance 2004: Joint International Conference on Measurement and Modeling of Computer Systems - New York, NY, United States
    Duration: 12 Jun 200416 Jun 2004

    Fingerprint

    Dive into the research topics of 'Myths and realities: The performance impact of garbage collection'. Together they form a unique fingerprint.

    Cite this