Quantifying the performance of garbage collection vs. explicit memory management

  title={Quantifying the performance of garbage collection vs. explicit memory management},
  author={Matthew Hertz and E. Berger},
  booktitle={OOPSLA '05},
Garbage collection yields numerous software engineering benefits, but its quantitative impact on performance remains elusive. One can compare the cost of conservative garbage collection to explicit memory management in C/C++ programs by linking in an appropriate collector. This kind of direct comparison is not possible for languages designed for garbage collection (e.g., Java), because programs in these languages naturally do not contain calls to free. Thus, the actual gap between the time and… 

Figures and Tables from this paper

Quantifying and Improving the Performance of Garbage Collection
Oracular memory management is developed to help answer how well garbage collection performs currently and which areas remain for it to improve, by enabling us to quantify garbage collection's performance.
A Static Analysis for Automatic Individual Object Reclamation in Java
This work comes closer to the best of both worlds by adding novel runtime and compiler support for compiler-inserted frees to a garbage-collected system and differs from stack and region allocation in two crucial ways.
Project snowflake: non-blocking safe manual memory management in .NET
This work proposes integrating safe manual memory management with garbage collection in the .NET runtime to get the best of both worlds, and shows substantial performance gains especially in multithreaded scenarios.
Prioritized garbage collection: explicit GC support for software caches
This paper presents prioritized garbage collection, a cooperative programming language and runtime solution to this problem, and uses this API to implement a space-aware least-recently-used cache, called a Sache, that is a drop-in replacement for existing caches, such as Google's Guava library.
Free-Me: a static analysis for automatic individual object reclamation
This work comes closer to the best of both worlds by adding novel compiler and runtime support for compiler inserted frees to a garbage-collected system and evaluates free() variations for free-list and bump-pointer allocators.
Performance evaluation of garbage collection policies
The goal of this thesis is to statistically characterise the memory allocation requirements of some classes of applications to provide numerically tractable models to predict some performance indices of the system, i.e., throughput and average response time, given different garbage collection policies, and to validate those models through a comparison with experimental results.
The Garbage Collection Handbook: The art of automatic memory management
The Garbage Collection Handbook: The Art of Automatic Memory Management brings together a wealth of knowledge gathered by automatic memory management researchers and developers over the past fifty years and addresses new challenges to garbage collection made by recent advances in hardware and software.
Fortune teller: improving garbage collection performance in server environment using live objects prediction
A predictive approach is introduced that can provide an accurate estimation of the number of dead objects at any specific point of execution and is found that the model is sufficiently accurate in three SPECjvm98 benchmark applications.
An Empirical Lower Bound on the Overheads of Production Garbage Collectors
A methodology that allows for a lower bound on the absolute overhead (LBO) of GCs is developed and key performance tradeoffs of five production GCs in OpenJDK 17, a high-performance Java runtime are exposed.
The design and construction of high performance garbage collectors
This thesis is that a thorough understanding of the characteristics of the heap to be collected, coupled with measured performance of various design alternatives on a range of modern architectures provides insights that can be used to improve the performance of any garbage collection algorithm.


Myths and realities: the performance impact of garbage collection
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
The measured cost of copying garbage collection mechanisms
This study covers both low-level object representation and copying issues as well as the mechanisms needed to support more advanced techniques such as generational collection, large object spaces, and type segregated areas.
The measured cost of conservative garbage collection
  • B. Zorn
  • Computer Science
    Softw. Pract. Exp.
  • 1993
It is found that programmer enhancements often have little effect on program performance and that the true cost of conservative garbage collection is not the CPU overhead, but the memory system overhead of the algorithm.
Garbage collection without paging
This bookmarking collector cooperates with the virtual memory manager to guide its eviction decisions, and using summary information recorded from evicted pages, the collector can perform in-memory full-heap collections.
Framework for Analyzing Garbage Collection
A theoretical framework for analyzing garbage collection algorithms is proposed and it is shown how this framework could compute the time cost of garbage collectors and inspired a new trace gen- eration algorithm, Merlin, which runs more than 800 times faster than previous methods for generating accurate traces.
Error-free garbage collection traces: how to cheat and not get caught
This work presents a systematic methodology and results on the effects of trace granularity for a variety of copying GC algorithms, and introduces and measures the performance of a new precise algorithm for generating GC traces which is over 800 times faster than the brute force method.
Automatic heap sizing: taking real memory into account
This work presents an automatic heap-sizing algorithm applicable to different garbage collectors with only modest changes, and shows that its adaptive heap sizing algorithm can substantially reduce running time over fixed-sized heaps.
The garbage collection advantage: improving program locality
This paper introduces online object reordering (OOR) which includes a new dynamic, online class analysis for Java that detects program traversal patterns and exploits them in a copying collector that uses run-time method sampling that drives just-in-time (JIT) compilation.
Garbage Collection is Fast, but a Stack is Faster
It is found that stack allocation of continuation frames outperforms heap allocation in some cases by almost a factor of three, ensuring that stacks remain an important implementation technique for procedure calls, even in the presence of an efficient, compacting garbage collector and large amounts of memory.
Garbage collection in an uncooperative environment
This approach greatly simplifies the implementation of languages supporting garbage collection and allows conventional compilers to be used with a garbage collector, either as the primary means of storage reclamation, or as a debugging tool.