Dynamic prediction of collection yield for managed runtimes

The growth in complexity of modern systems makes it increasingly difficult to extract high-performance. The software stacks for such systems typically consist of multiple layers and include managed runtime environments (MREs). In this paper, we investigate techniques to improve cooperation between these layers and the hardware to increase the efficacy of automatic memory management in MREs. General-purpose MREs commonly implement parallel and/or concurrent garbage collection and employ compaction to eliminate heap fragmentation. Moreover, most systems trigger collection based on the amount of heap a program uses. Our analysis shows that in many cases this strategy leads to ineffective collections that are unable to reclaim sufficient space to justify the incurred cost. To avoid such collections, we exploit the observation that dead objects tend to cluster together and form large, never-referenced, regions in the address space that correlate well with virtual pages that have not recently been referenced by the application. We leverage this correlation to design a new, simple and light-weight, yield predictor that estimates the amount of reclaimable space in the heap using hardware page reference bits. Our predictor allows MREs to avoid low-yield collections and thereby improve resource management. We integrate this predictor into three state-of-the-art parallel compactors, implemented in the HotSpot JVM, that represent distinct canonical heap layouts. Our empirical evaluation, based on standard Java benchmarks and open-source applications, indicates that inexpensive and accurate yield prediction can improve performance significantly.

[1]  Lieven Eeckhout,et al.  GCH: Hints for Triggering Garbage Collections , 2007, Trans. High Perform. Embed. Archit. Compil..

[2]  Guy E. Blelloch,et al.  A parallel, real-time garbage collector , 2001, PLDI '01.

[3]  Benjamin G. Zorn,et al.  Using lifetime predictors to improve memory allocation performance , 1993, PLDI '93.

[4]  Chen Ding,et al.  Program-level adaptive memory management , 2006, ISMM '06.

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

[6]  Stephanie Forrest,et al.  Object Lifetime Prediction in Java , 2003 .

[7]  Kaivalya M. Dixit,et al.  The SPEC benchmarks , 1991, Parallel Comput..

[8]  Chandra Krintz,et al.  Isla Vista Heap Sizing: Using Feedback to Avoid Paging , 2007, International Symposium on Code Generation and Optimization (CGO'07).

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

[10]  James Bessen Open Source Software , 2006 .

[11]  Erez Petrank,et al.  The Compressor: concurrent, incremental, and parallel compaction , 2006, PLDI '06.

[12]  Witawas Srisa-an,et al.  Microphase: an approach to proactively invoking garbage collection for improved performance , 2007, OOPSLA.

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

[14]  Emery D. Berger,et al.  Garbage collection without paging , 2005, PLDI '05.

[15]  Chandra Krintz,et al.  The mapping collector: virtual memory support for generational, parallel, and concurrent compaction , 2008, ASPLOS.

[16]  Matthew L. Seidl,et al.  Segregating heap objects by reference behavior and lifetime , 1998, ASPLOS VIII.

[17]  Michael Wolf,et al.  The pauseless GC algorithm , 2005, VEE '05.

[18]  Emery D. Berger,et al.  Automatic heap sizing: taking real memory into account , 2004, ISMM '04.

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

[20]  Chris Ryder,et al.  Garbage Collection Should Be Lifetime Aware , 2006 .

[21]  Alexandru Nicolau,et al.  Comparison of Compacting Algorithms for Garbage Collection , 1983, TOPL.

[22]  Emery D. Berger,et al.  CRAMM: virtual memory support for garbage-collected applications , 2006, OSDI '06.

[23]  Andrew W. Appel,et al.  Virtual memory primitives for user programs , 1991, ASPLOS IV.

[24]  Richard E. Jones,et al.  Decrypting the Java gene pool , 2007, ISMM '07.

[25]  Richard Jones,et al.  Dynamic Memory Management: Challenges for Today and Tomorrow , 2007 .

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

[27]  Emery D. Berger,et al.  Page-Level Cooperative Garbage Collection , 2004 .

[28]  Yoav Ossia,et al.  Mostly concurrent compaction for mark-sweep GC , 2004, ISMM '04.

[29]  David A. Cohn,et al.  Predicting Lifetimes in Dynamically Allocated Memory , 1996, NIPS.

[30]  Sergio Yovine,et al.  Parametric prediction of heap memory requirements , 2008, ISMM '08.

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

[32]  David Detlefs,et al.  Garbage-first garbage collection , 2004, ISMM '04.

[33]  David Ungar Generation scavenging: a nondisruptive high performance storage reclamation algorithm , 1984 .

[34]  Thomas P. Murtagh,et al.  Lifetime analysis of dynamically allocated objects , 1988, POPL '88.

[35]  Nir Shavit,et al.  Parallel Garbage Collection for Shared Memory Multiprocessors , 2001, Java Virtual Machine Research and Technology Symposium.

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