Page-Level Cooperative Garbage Collection

Programs written in garbage-collected languages like Java often have large working sets and poor locality. Worse, a full garbage collection must visit all live data and is likely to touch pages that are no longer resident, triggering paging. The result is a pronounced drop in throughput and a spike in latency. We show that just a slight reduction in available memory causes the throughput of the SPECjbb benchmark to drop by 66% and results in garbage collection pauses lasting for several seconds. This paper introduces page-level cooperative garbage collection, an approach in which the garbage collector works with the virtual memory manager to limit paging. We present a novel, cooperative garbage collection algorithm called Hippocratic collection. By communicating with the virtual memory manager and “bookmarking” objects, the Hippocratic collector eliminates paging caused by garbage collection. Our approach requires only modest extensions to existing virtual memory management algorithms. We present empirical results using our modified Linux kernel. We show that the Hippocratic collector runs in smaller footprints than traditional collectors while providing competitive throughput. Under memory pressure, Hippocratic collection improves the throughput of SPECjbb by a factor of two over the next best garbage collector.

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

[2]  Dylan McNamee,et al.  Extending the Mach External Pager Interface to Accomodate User-Level Page Replacement Policies , 1990, USENIX MACH Symposium.

[3]  Darko Stefanovic,et al.  Properties of age-based automatic memory reclamation algorithms , 1999 .

[4]  Andrew W. Appel,et al.  Simple generational garbage collection and fast allocation , 1989, Softw. Pract. Exp..

[5]  Emery D. Berger,et al.  Automatic vs. Explicit Memory Management: Settling the Performance Debate , 2004 .

[6]  Suzy Platt,et al.  Respectfully quoted: A dictionary of quotations requested from the Congressional Research Service , 1989 .

[7]  Domenico Ferrari,et al.  Two-Level Replacement Decisions in Paging Stores , 1983, IEEE Transactions on Computers.

[8]  Kathryn S. McKinley,et al.  Hoard: a scalable memory allocator for multithreaded applications , 2000, SIGP.

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

[10]  Paul R. Wilson,et al.  Dynamic Storage Allocation: A Survey and Critical Review , 1995, IWMM.

[11]  Lieven Eeckhout,et al.  How java programs interact with virtual machines at the microarchitectural level , 2003, OOPSLA '03.

[12]  J. Eliot B. Moss,et al.  Mark-copy: fast copying GC with less space overhead , 2003, OOPSLA '03.

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

[14]  Robert Courts,et al.  Improving locality of reference in a garbage-collecting memory management system , 1988, CACM.

[15]  Guanshan Tong,et al.  Leveled Garbage Collection , 2001, J. Funct. Log. Program..

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

[17]  Eric Cooper,et al.  Improving the performance of SML garbage collection using application-specific virtual memory management , 1992, LFP '92.

[18]  Robert Fenichel,et al.  A LISP garbage-collector for virtual-memory computer systems , 1969, CACM.

[19]  Andrew W. Appel,et al.  An advisor for flexible working sets , 1990, SIGMETRICS '90.

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

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

[22]  Jin-Soo Kim,et al.  Memory system behavior of Java programs: methodology and analysis , 2000, SIGMETRICS '00.