The measured cost of copying garbage collection mechanisms

We examine the costs and benefits of a variety of copying garbage collection (GC) mechanisms across multiple architectures and programming languages. Our 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.Our experiments are made possible by a novel performance analysis tool, Oscar. Oscar allows us to capture snapshots of programming language heaps that may then be used to replay garbage collections. The replay program is self-contained and written in C, which makes it easy to port to other architectures and to analyze with standard performance analysis tools. Furthermore, it is possible to study additional programming languages simply by instrumenting existing implementations to capture heap snapshots.In general, we found that careful implementation of GC mechanisms can have a significant benefit. For a simple collector, we measured improvements of as much as 95%. We then found that while the addition of advanced features can have a sizeable overhead (up to 15%), the net benefit is quite positive, resulting in additional gains of up to 42%. We also found that results varied depending upon the platform and language. Machine characteristics such as cache arrangements, instruction set (RISC/CISC), and register pool were important. For different languages, average object size seemed to be most important.The results of our experiments demonstrate the usefulness of a tool like Oscar for studying GC performance. Without much overhead, we can easily identify areas where programming language implementors could collaborate with GC implementors to improve GC performance.

[1]  John H. Reppy A High-performance Garbage Collector for Standard ML , 1993 .

[2]  Darko Stefanovic,et al.  A comparative performance evaluation of write barrier implementation , 1992, OOPSLA '92.

[3]  David M. Ungar,et al.  Generation Scavenging: A non-disruptive high performance storage reclamation algorithm , 1984, SDE 1.

[4]  Antony L. Hosking,et al.  Protection traps and alternatives for memory management of an object-oriented language , 1994, SOSP '93.

[5]  Amer Diwan,et al.  A Language-Independent Garbage Collector Toolkit , 1991 .

[6]  David A. Moon,et al.  Garbage collection in a large LISP system , 1984, LFP '84.

[7]  Amer Diwan,et al.  Memory subsystem performance of programs using copying garbage collection , 1994, POPL '94.

[8]  Allen Wirfs-Brock,et al.  A third generation Smalltalk-80 implementation , 1986, OOPSLA 1986.

[9]  Paul R. Wilson,et al.  Caching considerations for generational garbage collection , 1992, LFP '92.

[10]  Amer Diwan,et al.  Measuring the cost of storage management , 1996, LISP Symb. Comput..

[11]  Mark B. Reinhold,et al.  Cache performance of garbage-collected programs , 1994, PLDI '94.

[12]  Alexander L. Wolf,et al.  Partition selection policies in object database garbage collection , 1994, SIGMOD '94.

[13]  Paul R. Wilson,et al.  Effective “static-graph” reorganization to improve locality in garbage-collected systems , 1991, PLDI '91.

[14]  Benjamin G Zorn Barrier Methods for Garbage Collection ; CU-CS-494-90 , 1990 .

[15]  Rafael Dueire Lins,et al.  Garbage collection: algorithms for automatic dynamic memory management , 1996 .

[16]  Benjamin G. Zorn,et al.  The measured cost of conservative garbage collection , 1993, Softw. Pract. Exp..

[17]  Darko Stefanovic,et al.  A comparative performance evaluation of write barrier implementation , 1992, OOPSLA.

[18]  Frank Jackson,et al.  An adaptive tenuring policy for generation scavengers , 1992, TOPL.

[19]  Paul R. Wilson,et al.  Uniprocessor Garbage Collection Techniques , 1992, IWMM.

[20]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[21]  T MooreJonathan,et al.  The measured cost of copying garbage collection mechanisms , 1997 .

[22]  Ben Zorn,et al.  Barrier Methods for Garbage Collection , 1990 .

[23]  Henry Lieberman,et al.  A real-time garbage collector based on the lifetimes of objects , 1983, CACM.