Yak: A High-Performance Big-Data-Friendly Garbage Collector

Most "Big Data" systems are written in managed languages, such as Java, C#, or Scala. These systems suffer from severe memory problems due to the massive volume of objects created to process input data. Allocating and deallocating a sea of data objects puts a severe strain on existing garbage collectors (GC), leading to high memory management overheads and reduced performance. This paper describes the design and implementation of Yak, a "Big Data" friendly garbage collector that provides high throughput and low latency for all JVM-based languages. Yak divides the managed heap into a control space (CS) and a data space (DS), based on the observation that a typical data-intensive system has a clear distinction between a control path and a data path. Objects created in the control path are allocated in the CS and subject to regular tracing GC. The lifetimes of objects in the data path often align with epochs creating them. They are thus allocated in the DS and subject to region-based memory management. Our evaluation with three large systems shows very positive results.

[1]  Joseph M. Hellerstein,et al.  MapReduce Online , 2010, NSDI.

[2]  John Kubiatowicz,et al.  Taurus: A Holistic Language Runtime System for Coordinating Distributed Managed-Language Applications , 2016, ASPLOS.

[3]  Languages Object-Oriented Programming Systems,et al.  OOPSLA'12 : proceedings of the 2012 ACM International Conference on Object Oriented Programming Systems Languages and Applications, October 19-26, 2012, Tucson, Arizona, USA , 2012 .

[4]  Dinakar Dhurjati,et al.  Ensuring code safety without runtime checks for real-time control systems , 2002, CASES '02.

[5]  Samuel T. King,et al.  Proceedings of the 2003 Symposium on Operating Systems Principles (SOSP) , 2003 .

[6]  Kathryn S. McKinley,et al.  Immix: a mark-region garbage collector with space efficiency, fast collection, and mutator performance , 2008, PLDI '08.

[7]  Pete Wyckoff,et al.  Hive - A Warehousing Solution Over a Map-Reduce Framework , 2009, Proc. VLDB Endow..

[8]  Laurie J. Hendren,et al.  An adaptive, region-based allocator for java , 2002, MSP/ISMM.

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

[10]  Matthew Arnold,et al.  Software bloat analysis: finding, removing, and preventing performance problems in modern large-scale object-oriented applications , 2010, FoSER '10.

[11]  Michael Isard,et al.  Distributed aggregation for data-parallel computing: interfaces and implementations , 2009, SOSP '09.

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

[13]  Yuan Yu,et al.  Dryad: distributed data-parallel programs from sequential building blocks , 2007, EuroSys '07.

[14]  M. Abadi,et al.  Naiad: a timely dataflow system , 2013, SOSP.

[15]  Guoqing Xu,et al.  Finding reusable data structures , 2012, OOPSLA '12.

[16]  Ravi Kumar,et al.  Pig latin: a not-so-foreign language for data processing , 2008, SIGMOD Conference.

[17]  Rares Vernica,et al.  Hyracks: A flexible and extensible foundation for data-intensive computing , 2011, 2011 IEEE 27th International Conference on Data Engineering.

[18]  Michael J. Carey,et al.  A bloat-aware design for big data applications , 2013, ISMM '13.

[19]  Guoqing Xu,et al.  Cachetor: detecting cacheable data to remove bloat , 2013, ESEC/FSE 2013.

[20]  Mads Tofte,et al.  Implementation of the typed call-by-value λ-calculus using a stack of regions , 1994, POPL '94.

[21]  Rob Pike,et al.  Interpreting the data: Parallel analysis with Sawzall , 2005, Sci. Program..

[22]  Onur Mutlu,et al.  Improving the performance of object-oriented languages with dynamic predication of indirect jumps , 2008, ASPLOS.

[23]  Chen Li,et al.  AsterixDB: A Scalable, Open Source BDMS , 2014, Proc. VLDB Endow..

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

[25]  Sigmund Cherem,et al.  Region analysis and transformation for Java programs , 2004, ISMM '04.

[26]  John Kubiatowicz,et al.  Trash Day: Coordinating Garbage Collection in Distributed Systems , 2015, HotOS.

[27]  John McCarthy,et al.  Recursive functions of symbolic expressions and their computation by machine, Part I , 1960, Commun. ACM.

[28]  Lu Fang,et al.  FACADE: A Compiler and Runtime for (Almost) Object-Bounded Big Data Applications , 2015, ASPLOS.

[29]  Sanjay Ghemawat,et al.  MapReduce: Simplified Data Processing on Large Clusters , 2004, OSDI.

[30]  Onur Mutlu,et al.  VPC prediction: reducing the cost of indirect branches via hardware-based dynamic devirtualization , 2007, ISCA '07.

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

[32]  Douglas Stott Parker,et al.  Map-reduce-merge: simplified relational data processing on large clusters , 2007, SIGMOD '07.

[33]  Hai Jin,et al.  Lifetime-Based Memory Management for Distributed Data Processing Systems , 2016, Proc. VLDB Endow..

[34]  Martin Elsman,et al.  Combining region inference and garbage collection , 2002, PLDI '02.

[35]  Henry G. Baker,et al.  List processing in real time on a serial computer , 1978, CACM.

[36]  J. Eliot B. Moss,et al.  Incremental Collection of Mature Objects , 1992, IWMM.

[37]  Emery D. Berger,et al.  A locality-improving dynamic memory allocator , 2005, MSP '05.

[38]  James Cheney,et al.  Region-based memory management in cyclone , 2002, PLDI '02.

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

[40]  Timothy Harris,et al.  Early storage reclamation in a tracing garbage collector , 1999, SIGP.

[41]  Chris J. Cheney A nonrecursive list compacting algorithm , 1970, Commun. ACM.

[42]  Lu Fang,et al.  Interruptible tasks: treating memory pressure as interrupts for highly scalable data-parallel programs , 2015, SOSP.

[43]  Lu Fang,et al.  Speculative region-based memory management for big data systems , 2015, PLOS@SOSP.

[44]  Edith Schonberg,et al.  Finding low-utility data structures , 2010, PLDI '10.

[45]  Dan Grossman,et al.  Experience with safe manual memory-management in cyclone , 2004, ISMM '04.

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

[47]  Martin C. Rinard,et al.  Ownership types for safe region-based memory management in real-time Java , 2003, PLDI '03.

[48]  Atanas Rountev,et al.  Detecting inefficiently-used containers to avoid bloat , 2010, PLDI '10.

[49]  Scott Shenker,et al.  Spark: Cluster Computing with Working Sets , 2010, HotCloud.

[50]  Nick Mitchell,et al.  The causes of bloat, the limits of health , 2007, OOPSLA.

[51]  Jingren Zhou,et al.  SCOPE: easy and efficient parallel processing of massive data sets , 2008, Proc. VLDB Endow..

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

[53]  David Gay,et al.  Memory management with explicit regions , 1998, PLDI.

[54]  Martin C. Rinard,et al.  An Implementation of Scoped Memory for Real-Time Java , 2001, EMSOFT.

[55]  Feng Qian,et al.  An adaptive, region-based allocator for java , 2002, ISMM '02.

[56]  Guy E. Blelloch,et al.  GraphChi: Large-Scale Graph Computation on Just a PC , 2012, OSDI.

[57]  Matthew Arnold,et al.  Go with the flow: profiling copies to find runtime bloat , 2009, PLDI '09.

[58]  Onur Mutlu,et al.  Flexible reference-counting-based hardware acceleration for garbage collection , 2009, ISCA '09.

[59]  Michael Isard,et al.  Broom: Sweeping Out Garbage Collection from Big Data Systems , 2015, HotOS.

[60]  Michael Isard,et al.  DryadLINQ: A System for General-Purpose Distributed Data-Parallel Computing Using a High-Level Language , 2008, OSDI.

[61]  David Gay,et al.  Language support for regions , 2001, PLDI '01.

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

[63]  Alexander Aiken,et al.  Better static memory management: improving region-based analysis of higher-order languages , 1995, PLDI '95.

[64]  Nhan Nguyen,et al.  NumaGiC: a Garbage Collector for Big Data on Big NUMA Machines , 2015, ASPLOS.

[65]  Amer Diwan,et al.  Connectivity-based garbage collection , 2003, OOPSLA 2003.

[66]  Henning Makholm A region-based memory manager for prolog , 2000, ISMM '00.