Download presentation
Presentation is loading. Please wait.
Published byTamsyn Perkins Modified over 6 years ago
1
Yak: A High-Performance Big-Data-Friendly Garbage Collector
Khanh Nguyen, Lu Fang, Guoqing Xu, Brian Demsky, Sanazsadat Alamian, Shan Lu Onur Mutlu University of California, Irvine University of Chicago ETH Zürich
2
BIG DATA Naiad Cloudera is the first that commercialized Hadoop – claimed to be the leader – opened in 2008 Hortonworks is Hadoop-enterprise – opened in 2011 Giraph: open-source counterpart of Pregel Hama: general Bulk Synchronous Processing computing engine on top of Hadoop to do scientific computing, iterative algorithm such Matrix, Graph and Machine Learning Hive: data warehouse: query and manage large datasets in distributed storage using SQL-like language, based on MapReduce – initially developed by Facebook Pig: has high-level language to express data analysis program – its infrastructure support parallel execution, auto-tune efficiency. On Hadoop Storm: distributed realtime computation system, easy to process unbounded streams of data. Utilize queueing and database technologies to consume data in arbitrary complex way, repartition streams between each stage Flume: library for collecting, aggregating and moving large amounts of log data. Main goal is to deliver data from applications to HDFS, based on streaming data flow. Mahout: machine learning, dumped Hadoop, used Spark Dryad
3
High cost of the managed runtime is a fundamental problem!
Scalability JVM crashes due to OutOfMemory error at early stage [Fang et al., SOSP’15] Management cost GC time accounts for up to 50% of the execution time [Bu et al., ISMM’13] High cost of the managed runtime is a fundamental problem!
4
Two Paths, Two Hypotheses
MASTER SLAVE SLAVE Control path Data path Epochal Hypothesis Generational Hypothesis
5
Region-based memory management WordCount
Many data objects have the same life span: Document Mapper Memory Region Heap setup setup Region-based memory management words GC map cleanup cleanup GC run in the middle is wasted Can be efficiently reclaimed together
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
Reduced memory management cost
Yak Approach Heap Control Space Data Space Generational GC Region-based Memory Management Reduced memory management cost annotate epoch boundary: - epoch_start() - epoch_end()
9
annotation & refactoring
Correctness User-level approach: Facade [Nguyen et al., ASPLOS’15] Region annotation & refactoring Developers Yak
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
11
Challenges How to create regions? How to reclaim regions correctly?
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
13
How to Create Regions? Region Semilattice CS,* 1,t1 1,t2 region 2,t1
void main() { } //end of main CS,* epoch #1 epoch_start(); for( ) { } epoch_end(); epoch #2 epoch_start(); for( ) { } epoch_end(); 1,t1 1,t2 epoch #3 epoch_start(); for( ) { } epoch_end(); region 2,t1 2,t2 3,t1 3,t2 JOIN( , ) = 2,t1 2,t2 CS,* JOIN( , ) = 3,t1 2,t1
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
15
Region Deallocation epoch_end() <CS,*> <r1, t1> t1’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
17
-78% -33% -2% Improvement Summary GC Time App. Time Exec. Time
Normalized Performance (to PS) -78% -33% -2% GC Time App. Time Exec. Time
18
More Data in the Paper Statistics on Yak’s heap Overhead breakdowns
Write barrier cost Extra space cost
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
20
Thank You!
Similar presentations
© 2024 SlidePlayer.com. Inc.
All rights reserved.