Microphase: an approach to proactively invoking garbage collection for improved performance

To date, the most commonly used criterion for invoking garbage collection (GC) is based on heap usage; that is, garbage collection is invoked when the heap or an area inside the heap is full. This approach can suffer from two performance shortcomings: untimely garbage collection invocations and large volumes of surviving objects. In this work, we explore a new GC triggering approach called MicroPhase that exploits two observations: (i) allocation requests occur in phases and (ii) phase boundaries coincide with times when most objects also die. Thus, proactively invoking garbage collection at these phase boundaries can yield high efficiency. We extended the HotSpot virtual machine from Sun Microsystems to support MicroPhase and conducted experiments using 20 benchmarks. The experimental results indicate that our technique can reduce the GC times in 19 applications. The differences in GC overhead range from an increase of 1% to a decrease of 26% when the heap is set to twice the maximum live-size. As a result, MicroPhase can improve the overall performance of 13 benchmarks. The performance differences range from a degradation of 2.5% to an improvement of 14%.

[1]  Erez Petrank,et al.  Thread-local heaps for Java , 2002, MSP/ISMM.

[2]  Lieven Eeckhout,et al.  Garbage Collection Hints , 2005, HiPEAC.

[3]  Urs Hölzle,et al.  A Study of the Allocation Behavior of the SPECjvm98 Java Benchmark , 1999, ECOOP.

[4]  Mauricio J. Serrano,et al.  Thin locks: featherweight Synchronization for Java , 2004, SIGP.

[5]  Kathryn S. McKinley,et al.  Beltway: getting around garbage collection gridlock , 2002, PLDI '02.

[6]  LiChang,et al.  Controlling garbage collection and heap growth to reduce the execution time of Java applications , 2001 .

[7]  Paul R. Wilson Opportunistic garbage collection , 1988, SIGP.

[8]  Matthias Hauswirth,et al.  Vertical profiling: understanding the behavior of object-priented applications , 2004, OOPSLA.

[9]  Kathryn S. McKinley,et al.  Pretenuring for Java , 2001, OOPSLA '01.

[10]  Chandra Krintz,et al.  Visualization and analysis of phased behavior in Java programs , 2004, PPPJ.

[11]  Elliot K. Kolodner,et al.  On effectiveness of GC in Java , 2000, ISMM '00.

[12]  Sven Gestegard Robertz,et al.  Time-triggered garbage collection: robust and adaptive real-time GC scheduling for embedded systems , 2003 .

[13]  Chen Ding,et al.  Gated memory control for memory monitoring, leak detection and garbage collection , 2005, MSP '05.

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

[15]  Paul R. Wilson,et al.  Design of the opportunistic garbage collector , 1989, OOPSLA '89.

[16]  Amer Diwan,et al.  The DaCapo benchmarks: java benchmarking development and analysis , 2006, OOPSLA '06.

[17]  J.M. Chang,et al.  Cycle accurate thread timer for linux environment , 2001, 2001 IEEE International Symposium on Performance Analysis of Systems and Software. ISPASS..

[18]  Tim Brecht,et al.  Controlling garbage collection and heap growth to reduce the execution time of Java applications , 2006, TOPL.

[19]  Witawas Srisa-an,et al.  AS-GC: An Efficient Generational Garbage Collector for Java Application Servers , 2007, ECOOP.

[20]  Martin C. Rinard,et al.  Write barrier removal by static analysis , 2002, OOPSLA.

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

[22]  Sven Gestegard Robertz,et al.  Time-triggered garbage collection: robust and adaptive real-time GC scheduling for embedded systems , 2003, LCTES '03.

[23]  J. Moss,et al.  Older-first garbage collection in practice: evaluation in a Java Virtual Machine , 2003, MSP '02.

[24]  Bjarne Steensgaard,et al.  Thread-specific heaps for multi-threaded programs , 2000, ISMM '00.

[25]  Chandra Krintz,et al.  Online phase detection algorithms , 2006, International Symposium on Code Generation and Optimization (CGO'06).

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

[27]  Kathryn S. McKinley,et al.  Free-Me: a static analysis for automatic individual object reclamation , 2006, PLDI '06.

[28]  Xiaofeng Gao,et al.  Profile-guided proactive garbage collection for locality optimization , 2006, PLDI '06.

[29]  V. T. Rajan,et al.  Controlling fragmentation and space consumption in the metronome, a real-time garbage collector for Java , 2003, LCTES '03.

[30]  Kathryn S. McKinley,et al.  Age-based garbage collection , 1999, OOPSLA '99.

[31]  Kathryn S. McKinley,et al.  Error-free garbage collection traces: how to cheat and not get caught , 2002, SIGMETRICS '02.

[32]  Witawas Srisa-an,et al.  Investigating throughput degradation behavior of Java application servers: a view from inside a virtual machine , 2006, PPPJ '06.