Thanh-Chung Dao and Shigeru Chiba The University of Tokyo
1
Thanh-Chung Dao
Improving Hadoop MapReduce Performance
- n Supercomputers with JVM Reuse
Improving Hadoop MapReduce Performance on Supercomputers with JVM - - PowerPoint PPT Presentation
1 Thanh-Chung Dao Improving Hadoop MapReduce Performance on Supercomputers with JVM Reuse Thanh-Chung Dao and Shigeru Chiba The University of Tokyo 2 Thanh-Chung Dao Supercomputers Expensive clusters Multi-core processors Large
1
Thanh-Chung Dao
Thanh-Chung Dao
2
Thanh-Chung Dao
3
Input Splitting Mapping Shuffling Reducing Result
PageA à PageB, PageC PageB à PageC PageC à PageA, PageB PageA à PageB, PageC PageB à PageC PageC à PageA, PageB <PageB, 0.5> <PageC, 0.5> <PageC, 1> <PageA, 0.5> <PageB, 0.5> <PageA, 0.5> <PageB, 0.5> <PageB, 0.5> <PageC, 0.5> <PageC, 1> <PageA, 0.5> <PageB, 1> <PageC, 1.5> PageA 0.5 PageB 1 PageC 1.5
Rank contribution
Shuffling Done automatically (Users can ignore)
Function Mapper Input PageA à PageB, PageC Begin N = outbound links For each outbound link
End Function Reducer Input <PageA, x1>, …<PageA, xn> Begin rank = 0 For each item xi rank += xi
End
Thanh-Chung Dao
4
Thanh-Chung Dao
5
Thanh-Chung Dao
6
Thanh-Chung Dao
7
10000 30000 Message size (Bytes) Throughput (Mbps) 20 24 28 212 216 220 226 MPI TCP
10 times faster
On FX10 supercomputer Throughput (Mbps)
Thanh-Chung Dao
8
MapTasks
Map output 1 Map output n
Local disk Slave nodes
HTTP Servlet Server
ReduceTasks
Sort & Merge Reducing
Multiple requests at once Mapping Phase Shuffling Phase Reducing Phase
Thanh-Chung Dao
9
Thanh-Chung Dao
10
Thanh-Chung Dao
11
Master node Slave 1 … Slave 2 Slave n A Node
Thanh-Chung Dao
12
Master node User Slave 1 … Job Submission 6 tasks 8 tasks 6 tasks Slave 2 Slave n Request sending A Node
Thanh-Chung Dao
13
Master node User Slave 1 … Job Submission Request sending 8 tasks 6 tasks Processes A Node Process creation 6 processes Slave 2 Slave n Process creation Each task is run
Process creation 6 processes 8 processes 6 tasks
Thanh-Chung Dao
14
Master node User Slave 1 … Job Submission Request sending 8 tasks 6 tasks Processes A Node Process creation Task running Slave 2 Slave n Process creation Each task is run
Process creation Task running Task running 6 tasks
Thanh-Chung Dao
15
Master node User Slave 1 … Job Submission Request sending 8 tasks 6 tasks Processes A Node Process creation
Terminated
Slave 2 Slave n Process creation Each task is run
Process creation
Terminated Terminated
6 tasks
Thanh-Chung Dao
16
Master node User Slave 1 … Job Completion Slave 2 Slave n Request sending A Node
Thanh-Chung Dao
17
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool idle idle idle JVM Pool idle idle idle JVM Pool idle idle idle
Thanh-Chung Dao
18
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool idle idle idle JVM Pool idle idle idle JVM Pool idle idle idle User Job Submission 6 tasks 8 tasks 6 tasks Request sending
Thanh-Chung Dao
19
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool Busy Busy idle JVM Pool Busy Busy idle JVM Pool Busy Busy Busy User Job Submission 6 tasks 8 tasks 6 tasks Request sending Allocation Allocation
Thanh-Chung Dao
20
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool
Running Running
idle JVM Pool
Running Running
idle JVM Pool
Running Running Running
User Job Submission 6 tasks 8 tasks 6 tasks Request sending
Thanh-Chung Dao
21
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool
Cleanup Cleanup
idle JVM Pool
Cleanup Cleanup
idle JVM Pool
Cleanup Cleanup Cleanup
User Job Submission 6 tasks 8 tasks 6 tasks Request sending
Thanh-Chung Dao
22
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool idle idle idle JVM Pool idle idle idle JVM Pool idle idle idle User Job Submission 6 tasks 8 tasks 6 tasks Request sending
Thanh-Chung Dao
23
Master node Slave 1 … Processes A Node Slave 2 Slave n JVM Pool idle idle idle JVM Pool idle idle idle JVM Pool idle idle idle User Job Completion Request sending
Thanh-Chung Dao
24
Thanh-Chung Dao
25
OS level process creation Class loader subsystem
Class loading Class linking (verification & initializing)
Execution engine
JIT compiler Execute A instructions
Invoke main() method
Cmd: java A
Invoke main() method
Process creation & class loader are skipped
Execute B instructions
Thanh-Chung Dao
26
Pre-processing job Reduce Map Maps use results
Iteration Job A Reduce Map Job A Reduce Map
Stop Cond?
No Yes, then quit Initial data
Thanh-Chung Dao
27
JVM Pool
Process creation request Round-robin scheduling
Process Pool on each node Hadoop YARN (Node manager) Pool Manager
idle Busy Busy Busy Busy idle Allocation
De-allocation
Busy Process Request sending State changing
Thanh-Chung Dao
28
Mapping Phase Shuffling Phase Reducing Phase MapTasks
Map output 2 Map output n
Local disk Node 2
Shuffle Manager
ReduceTask 2
Sort & Merge Reducing
MPI send/recv One request at once
Thanh-Chung Dao
29
Thanh-Chung Dao
30
Thanh-Chung Dao
31
Thanh-Chung Dao
32
Thanh-Chung Dao
33
Thanh-Chung Dao
34
50 100 150 200 250 Input size (GB) Tera-sort Execution Time (s) 4 8 16 Nonblocking TCP Shuffle Blocking TCP shuffle Blocking MPI shuffle
Nonblocking : accept multi-connection at once Blocking : accept one connection at once up to 10% faster
1 30 64 98 137 180 223
Task ID 0s 40s 80s 120s 160s 200s 240s 280s 320s 360s 400s
Start-up (JVM & User info) Task initializing Shuffling (at Reducers) Data reading Task running Task finishing (MapOutput writing) 1 30 64 98 136 179 222
Time (s) Task ID 0s 40s 80s 120s 160s 200s 240s 280s 320s 360s 400s
Thanh-Chung Dao
35
Original Hadoop JVM Reuse Hadoop 2nd iteration 50 seconds faster 1st iteration 2nd iteration Start-up time
Thanh-Chung Dao
36
Sum of start-up time Execution time Ratio
1000 3000 5000 Iteration number (n) Sum of start-up time (s) 1 2 4 6 8 Original Hadoop JVM Reuse-based Hadoop 200 400 600 800 1000 Iteration number (n) Execution Time (s) 1 2 4 6 8 Original Hadoop JVM Reuse-based Hadoop Approach Execution Time (s) 5000 10000 15000 20000 Original Hadoop JVM Reuse Hadoop Start-up time Computation time
Thanh-Chung Dao
37
Thanh-Chung Dao
38