Learning when to garbage collect with random forests

Generational garbage collectors are one of the most common types of automatic memory management. We can minimize the costs they incur by carefully choosing the points in a program's execution at which they run. However, this decision is generally based on simple, crude heuristics. Instead, we train random forest classifiers to decide when to collect based on features gathered from a running program. This reduces the total cost of collection in both time and space. We demonstrate useful generalization of learned policies to unseen traces of the same program, showing this approach may be fruitful for further investigation.

[1]  Meng-Chieh Chiu,et al.  Optimal Choice of When to Garbage Collect , 2019, ACM Trans. Program. Lang. Syst..

[2]  Samuel Z. Guyer,et al.  Elephant tracks: portable production of complete and precise gc traces , 2013, ISMM '13.

[3]  Kathryn S. McKinley,et al.  Generating object lifetime traces with Merlin , 2006, TOPL.

[4]  Feng Mao,et al.  The study and handling of program inputs in the selection of garbage collectors , 2009, OPSR.

[5]  Leo Breiman,et al.  Random Forests , 2001, Machine Learning.

[6]  Dongkun Shin,et al.  Reinforcement Learning-Assisted Garbage Collection to Mitigate Long-Tail Latency in SSD , 2017, ACM Trans. Embed. Comput. Syst..

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

[8]  Barry Hayes,et al.  Using key object opportunism to collect old objects , 1991, OOPSLA '91.

[9]  Antony L. Hosking,et al.  Reducing generational copy reserve overhead with fallback compaction , 2006, ISMM '06.

[10]  Gavin Brown,et al.  Garbage collection auto-tuning for Java mapreduce on multi-cores , 2011, ISMM '11.

[11]  Kyu Ho Park,et al.  A Phase-Adaptive Garbage Collector Using Dynamic Heap Partitioning and Opportunistic Collection , 2009, IEICE Trans. Inf. Syst..

[12]  Meng-Chieh Chiu,et al.  Assessing the limits of program-specific garbage collection performance , 2016, PLDI.

[13]  David Vengerov,et al.  Modeling, analysis and throughput optimization of a generational garbage collector , 2009, ISMM '09.

[14]  Mahmut T. Kandemir,et al.  Adaptive Garbage Collection for Battery-Operated Environments , 2002, Java Virtual Machine Research and Technology Symposium.

[15]  Lieven Eeckhout,et al.  Boosting the Priority of Garbage , 2016, ACM Trans. Archit. Code Optim..

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

[17]  David R. White,et al.  Control theory for principled heap sizing , 2013, ISMM '13.

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

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

[20]  S. Marion,et al.  Decrypting The Java Gene Pool Predicting objects ’ lifetimes with micro-patterns , 2007 .

[21]  Feng Mao,et al.  Cross-Input Learning and Discriminative Prediction in Evolvable Virtual Machines , 2009, 2009 International Symposium on Code Generation and Optimization.

[22]  Kellie J. Archer,et al.  Empirical characterization of random forest variable importance measures , 2008, Comput. Stat. Data Anal..

[23]  Roger Henriksson Adaptive Scheduling of Incremental Copying Garbage Collection for Interactive Applications , 1996 .

[24]  David A. Cieslak,et al.  Hellinger distance decision trees are robust and skew-insensitive , 2011, Data Mining and Knowledge Discovery.