Improving Big Data Performance with Yak: A Hybrid Garbage Collector

Slide Note
Embed
Share

Explore how Yak, a hybrid garbage collector, addresses challenges in managing memory for big data applications. Developed by a team of researchers, Yak is a high-performance solution that integrates generational garbage collection with region-based memory management, reducing costs and enhancing efficiency for data-intensive systems.


Uploaded on Sep 21, 2024 | 0 Views


Download Presentation

Please find below an Image/Link to download the presentation.

The content on the website is provided AS IS for your information and personal use only. It may not be sold, licensed, or shared on other websites without obtaining consent from the author. Download presentation by click this link. If you encounter any issues during the download, it is possible that the publisher has removed the file from their server.

E N D

Presentation Transcript


  1. Yak: A High-Performance Big-Data-Friendly Garbage Collector Khanh Nguyen, Lu Fang, Guoqing Xu, Brian Demsky, Sanazsadat Alamian, University of California, Irvine Shan Lu Onur Mutlu University of Chicago ETH Z rich

  2. BIG DATA Naiad Dryad 2

  3. Scalability JVM crashes due to OutOfMemory error at early stage Management cost GC time accounts for up to 50% of the execution time [Bu et al., ISMM 13] [Fang et al., SOSP 15] High cost of the managed runtime is a fundamental problem! 3

  4. Two Paths, Two Hypotheses Data Loads and Feeds Queries and Results Data Publishing Cloud Cluster Controller MASTER Partitioner Node Controller Node Controller ... SLAVE SLAVE Aggregate Join UDF Aggregate Join UDF Control path Data path Epochal Hypothesis Generational Hypothesis 4

  5. WordCount Many data objects have the same life span: Document Mapper Memory Heap Region setup setup words GC map cleanup cleanup GC run in the middle is wasted Can be efficiently reclaimed together 5

  6. Region-based Memory Management Sophisticated static analysis won t work for data-intensive systems What about control path? How to marry generational GC with region-based memory management?

  7. Yak Approach Control Space HeapData Space Generational GC Region-based Memory Management Reduced memory management cost annotate epoch boundary: - epoch_start() - epoch_end() 7

  8. 8

  9. Correctness User-level approach: Facade [Nguyen et al., ASPLOS 15] Region annotation & refactoring Developers Yak 9

  10. Yak: An Automatic Solution Yak: the first hybrid GC Implemented in OpenJDK 8 Modified the interpreter, two JIT compilers, the heap layout, the Parallel Scavenge GC NO code refactoring needed; correctness guaranteed by the system On average, vs. default production GC (PS): Reduce 33% execution time Reduce 78% GC time 10

  11. Challenges How to create regions? How to reclaim regions correctly? 11

  12. How to Create Regions? A region starts at a call to epoch-start and ends at a call to epoch-end The location of epochs affects performance but not correctness Regions are thread-local Regions can be nested 12

  13. Region Semilattice How to Create Regions? void main() { CS,* epoch #1 epoch_start(); for( ) { epoch #2 epoch_start(); for( ) { 1,t1 1,t2 epoch #3 epoch_start(); for( ) { } epoch_end(); region 2,t1 2,t2 } epoch_end(); 3,t1 3,t2 } epoch_end(); JOIN( , ) = 2,t1 JOIN( , ) = 3,t1 2,t2 2,t1 CS,* 2,t1 } //end of main 13

  14. How to Reclaim Regions Correctly? Object Promotion Algorithm Two key tasks: What: Identify escaping objects: Tracking of cross-region/space references in write barrier A fast path for intra-region references Inter-region references are recorded in the remember sets of their destination regions Where: Decide the relocation destination: Query region semilattice 14

  15. Region Deallocation epoch_end() <CS,*> <r1, t1> t1 s stack t3 s stack t2 s stack Remember Set escaping roots Barrier <r2, t1>

  16. Evaluations 3 real-world systems, 9 applications: Hadoop Popular distributed MapReduce implementation Hyracks [Borkar et al., ICDE 11] Data-parallel platform to run data-intensive jobs on a cluster of shared-nothing machines GraphChi [Kyrola et al., OSDI 12] High-performance graph analytical framework for a single machine 16

  17. Improvement Summary 1.8 Normalized Performance (to PS) 1.6 1.4 -78% 1.2 1.0 0.8 0.6 0.4 0.2 0.0 Hyracks Hyracks Hyracks GraphChi GraphChi GraphChi Hadoop Hadoop Hadoop Exec. Time GC Time App. Time 17

  18. More Data in the Paper Statistics on Yak s heap Overhead breakdowns Write barrier cost Extra space cost 18

  19. Conclusion Goal: Reduce memory management cost in Big Data systems Solution:Yak, the first hybrid GC 33% execution time savings 78% GC time reduction Requires almost zero user effort 19

  20. Thank You! 20

Related


More Related Content