Shredder
GPU-Accelerated Incremental Storage and Computation
Pramod Bhatotia§,
Rodrigo Rodrigues§, Akshat Verma¶
§MPI-SWS, Germany ¶IBM Research-India USENIX ¡FAST ¡2012 ¡
Handling the data deluge Data stored in data centers is growing at a - - PowerPoint PPT Presentation
Shredder GPU-Accelerated Incremental Storage and Computation Pramod Bhatotia , Rodrigo Rodrigues , Akshat Verma MPI-SWS, Germany IBM Research-India USENIX FAST 2012 Handling the data deluge Data stored in data
Rodrigo Rodrigues§, Akshat Verma¶
§MPI-SWS, Germany ¶IBM Research-India USENIX ¡FAST ¡2012 ¡
Pramod Bhatotia 2
Pramod Bhatotia 3
For large-scale data, chunking easily becomes a bottleneck
Content-based chunking [SOSP’01]
Content ¡ Marker ¡ Chunking ¡ File ¡ Chunks ¡ Hash ¡ Yes ¡ No ¡ Duplicate ¡ Hashing ¡ Matching ¡
0 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡0 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡0 ¡ ¡1 ¡ ¡0 ¡ ¡ ¡File ¡
Fingerprint ¡
GPUs have been successfully applied to compute-intensive tasks
Pramod Bhatotia 4
0 ¡ 0.5 ¡ 1 ¡ 1.5 ¡ 2 ¡ 2.5 ¡ 3 ¡ MulEcore ¡ GPU ¡based ¡design ¡ GBps ¡
20Gbps ¡(2.5GBps) ¡ ¡ Using GPUs for data-intensive tasks presents new challenges
Storage ¡ Servers ¡
Pramod Bhatotia 5
Pramod Bhatotia 6
GPU ¡(Device) ¡ CPU ¡(Host) ¡ Reader ¡ Transfer ¡ Store ¡ Chunking ¡ kernel ¡ Data ¡for ¡ ¡ chunking ¡ Chunked ¡ data ¡
Pramod Bhatotia 7
CPU ¡ (Host) ¡ ¡ ¡ GPU ¡(Device) ¡ MulE-‑processor ¡ ¡N ¡ MulE-‑processor ¡ ¡2 ¡ MulE-‑processor ¡ ¡1 ¡
SP ¡ SP ¡ SP ¡ SP ¡
PCI ¡ Host ¡memory ¡ Device ¡ ¡ ¡ global ¡ ¡ memory ¡
¡
Shared ¡memory ¡
Pramod Bhatotia 8
CPU ¡ (Host) ¡ ¡ ¡ GPU ¡(Device) ¡ MulE-‑processor ¡ ¡N ¡ MulE-‑processor ¡ ¡2 ¡ MulE-‑processor ¡ ¡1 ¡
SP ¡ SP ¡ SP ¡ SP ¡
PCI ¡ Host ¡memory ¡ Device ¡ ¡ ¡ global ¡ ¡ memory ¡
¡
Shared ¡memory ¡ Input ¡ Output ¡ Threads ¡
Pramod Bhatotia 9
(See ¡paper ¡for ¡details) ¡
Pramod Bhatotia 10
Challenge ¡# ¡1 ¡
GPU ¡(Device) ¡ Device ¡ ¡ global ¡ ¡ memory ¡ PCI ¡
Synchronous data transfer and kernel execution
CPU ¡(Host) ¡ Main ¡ memory ¡ Chunking ¡ kernel ¡ I/O ¡ Transfer ¡ Reader ¡
Pramod Bhatotia 11
Time ¡
Copy ¡to ¡ ¡ Buffer ¡1 ¡
GPU ¡(Device) ¡ Asynchronous ¡ copy ¡ Buffer ¡1 ¡ Device ¡global ¡memory ¡ Main ¡ memory ¡ Transfer ¡ Buffer ¡2 ¡ CPU ¡(Host) ¡
Compute ¡ Buffer ¡2 ¡ Compute ¡ Buffer ¡1 ¡ Copy ¡to ¡ ¡ Buffer ¡2 ¡
Pros: + Overlaps communication with computation + Generalizes to multi-buffering Cons:
Pramod Bhatotia 12
GPU ¡(Device) ¡ CPU ¡(Host) ¡ Memcpy ¡
Pinned circular Ring buffers Pageable buffers
Device ¡global ¡ ¡ memory ¡ Asynchronous ¡ copy ¡
Pramod Bhatotia 13
Challenge ¡# ¡2 ¡
GPU ¡(Device) ¡ Device ¡ ¡ global ¡ ¡ memory ¡ PCI ¡ CPU ¡(Host) ¡ Main ¡ memory ¡ Chunking ¡ kernel ¡ I/O ¡ Transfer ¡ Reader ¡
Pramod Bhatotia 14
Thread-‑1 ¡ Thread-‑2 ¡ Thread-‑4 ¡
Device ¡global ¡memory ¡ ¡ ¡
MulE-‑processor ¡ ¡ SP-‑1 ¡ SP-‑2 ¡ SP-‑3 ¡ SP-‑4 ¡ Thread-‑3 ¡ 400-‑600 ¡ Cycles ¡ Few ¡ cycles ¡ Device ¡shared ¡memory ¡
Pramod Bhatotia 15
Device ¡global ¡memory ¡
Un-coordinated accesses to global memory lead to a large number of memory bank conflicts
¡ ¡
MulE-‑processor ¡ ¡ SP ¡ Device ¡shared ¡memory ¡ SP ¡ SP ¡ SP ¡
Pramod Bhatotia 16
Bank ¡0 ¡ Bank ¡3 ¡ Bank ¡1 ¡ Bank ¡2 ¡ 0 ¡ 4 ¡ 8 ¡ 1 ¡ 5 ¡ 2 ¡ 6 ¡ 3 ¡ 7 ¡ MSBs ¡ LSBs ¡ Address ¡ Memory ¡ address ¡ Chip ¡ enable ¡ OR ¡ Data ¡out ¡ Interleaved ¡memory ¡
Pramod Bhatotia 17
Device ¡global ¡memory ¡ Device ¡shared ¡memory ¡ Memory ¡ coalescing ¡ Time ¡
1 ¡ 2 ¡ 4 ¡
Thread ¡# ¡
3 ¡
Pramod Bhatotia 18
Thread-‑1 ¡ Thread-‑2 ¡ Thread-‑4 ¡
Device ¡shared ¡memory ¡
Thread-‑3 ¡
Pramod Bhatotia 19
Pramod Bhatotia 20
(See ¡paper ¡for ¡details) ¡
Pramod Bhatotia 21
0 ¡ 0.5 ¡ 1 ¡ 1.5 ¡ 2 ¡ 2.5 ¡
MulEcore ¡ GPU ¡Basic ¡ GPU ¡Async ¡ GPU ¡Async ¡+ ¡ Coalescing ¡ GBps ¡ ¡
Pramod Bhatotia 22
(See ¡paper ¡for ¡details) ¡
Read input Map tasks Reduce tasks Write ¡output ¡
Pramod Bhatotia 23
Pramod Bhatotia
Read input Map tasks Reduce tasks Write ¡output ¡
24
Pramod Bhatotia 25
Input ¡file ¡ ¡ Shredder ¡ HDFS ¡Client ¡ ¡ copyFromLocal ¡ Split-‑1 ¡ Split-‑2 ¡ Split-‑3 ¡ Content-‑based ¡chunking ¡
Pramod Bhatotia 26
Pramod Bhatotia 27