Intelligent selection of application-specific garbage collectors

Java program execution times vary greatly with different garbage collection algorithms. Until now, it has not been possible to determine the best GC algorithm for aparticular program without exhaustively profiling that program for all available GC algorithms. This paper presents a new approach. We use machine learning techniques to build a prediction model that, given asingle profile run of a previously unseen Java program,can predict a good GC algorithm for that program. We implement this technique in Jikes RVM and test it onseveral standard benchmark suites. Our techniqueachieves 5% speedup in overall execution time (averagedacross all test programs for all heap sizes) compared with selecting the default GC algorithm in every trial. We present further experiments to show that an oracle predictor could achieve an average 17% speedup on the same experiments. In addition, we provide evidence to suggest that GC behaviour is sometimes independent of program inputs. These observations lead us to propose that intelligent selection of GC algorithms is suitably straight forward, efficient and effective to merit further exploration regarding its potential inclusion in the general Java software deployment process.

[1]  Robert P. Fitzgerald,et al.  The case for profile-directed selection of garbage collectors , 2000, ISMM '00.

[2]  Carla E. Brodley,et al.  Learning to Schedule Straight-Line Code , 1997, NIPS.

[3]  Emery D. Berger,et al.  MC2: high-performance garbage collection for memory-constrained environments , 2004, OOPSLA.

[4]  Ian H. Witten,et al.  Data mining: practical machine learning tools and techniques, 3rd Edition , 1999 .

[5]  Stephen J. Fink,et al.  The Jalapeño virtual machine , 2000, IBM Syst. J..

[6]  Perry Cheng,et al.  The garbage collection advantage: improving program locality , 2004, OOPSLA.

[7]  Ian Witten,et al.  Data Mining , 2000 .

[8]  Chandra Krintz,et al.  Dynamic selection of application-specific garbage collectors , 2004, ISMM '04.

[9]  J. Gregory Morrisett,et al.  Comparing mostly-copying and mark-sweep conservative collection , 1998, ISMM '98.

[10]  Chris F. Kemerer,et al.  A Metrics Suite for Object Oriented Design , 2015, IEEE Trans. Software Eng..

[11]  Perry Cheng,et al.  Oil and water? High performance garbage collection in Java with MMTk , 2004, Proceedings. 26th International Conference on Software Engineering.

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

[13]  David A. Patterson,et al.  Computer Architecture: A Quantitative Approach , 1969 .

[14]  Chang Li,et al.  Controlling garbage collection and heap growth to reduce the execution time of Java applications , 2006, ACM Trans. Program. Lang. Syst..

[15]  A. Beygelzimer Multiclass Classification with Filter Trees , 2007 .

[16]  Tony Printezis,et al.  Hot-Swapping Between a Mark&Sweep and a Mark&Compact Garbage Collector in a Generational Environment , 2001, Java Virtual Machine Research and Technology Symposium.

[17]  Benjamin G. Zorn,et al.  Comparing mark-and sweep and stop-and-copy garbage collection , 1990, LISP and Functional Programming.

[18]  Frank Hoffmann,et al.  To Collect or Not to Collect? Machine Learning for Memory Management , 2002, Java Virtual Machine Research and Technology Symposium.

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

[20]  Vivek Sarkar,et al.  The Jikes Research Virtual Machine project: Building an open-source research community , 2005, IBM Syst. J..

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