32
NVM-aware RDMA-based Communication and I/O Schemes for High-Performance Big Data Analytics Dhabaleswar K. (DK) Panda The Ohio State University E-mail: [email protected] http://www.cse.ohio-state.edu/~panda Talk at OpenFabrics Alliance Workshop (OFAW ‘17) by Xiaoyi Lu The Ohio State University E-mail: [email protected] http://www.cse.ohio-state.edu/~luxi

NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

  • Upload
    others

  • View
    6

  • Download
    0

Embed Size (px)

Citation preview

Page 1: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVM-aware RDMA-based Communication and I/O Schemes for High-Performance Big Data Analytics

Dhabaleswar K. (DK) PandaThe Ohio State University

E-mail: [email protected]://www.cse.ohio-state.edu/~panda

Talk at OpenFabrics Alliance Workshop (OFAW ‘17)

by

Xiaoyi LuThe Ohio State University

E-mail: [email protected]://www.cse.ohio-state.edu/~luxi

Page 2: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 2Network Based Computing Laboratory

Big Data Processing with Apache Big Data Analytics Stacks• Major components included:

– MapReduce (Batch)– Spark (Iterative and Interactive)– HBase (Query)– HDFS (Storage)– RPC (Inter-process communication)

• Underlying Hadoop Distributed File System (HDFS) used by MapReduce, Spark, HBase, and many others

• Model scales but high amount of communication and I/O can be further optimized!

HDFS

MapReduce

Apache Big Data Analytics Stacks

User Applications

HBase

Hadoop Common (RPC)

Spark

Page 3: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 3Network Based Computing Laboratory

Drivers of Modern HPC Cluster and Data Center Architecture

• Multi-core/many-core technologies

• Accelerators (NVIDIA GPGPUs and Intel Xeon Phi)

• Remote Direct Memory Access (RDMA)-enabled networking (InfiniBand and RoCE)

• NVRAM, SSD, Parallel Filesystems, Object Storage Clusters

High Performance Interconnects –InfiniBand (with SR-IOV)

<1usec latency, 200Gbps Bandwidth>Multi-/Many-core

Processors

Cloud CloudSDSC Comet TACC Stampede

Accelerators / Coprocessors high compute density, high

performance/watt>1 TFlop DP on a chip

SSD, NVMe-SSD, NVRAM

Page 4: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 4Network Based Computing Laboratory

• Understanding NVRAM and RDMA• NRCIO: NVM-aware RDMA-based Communication

and I/O Schemes• NRCIO for Big Data Analytics• Conclusion and Q&A

Presentation Outline

Page 5: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 5Network Based Computing Laboratory

Non-Volatile Memory (NVM) and NVMe-SSD

3D XPoint from Intel & Micron Samsung NVMe SSD Performance of PMC Flashtec NVRAM [*]

• Non-Volatile Memory (NVM) provides byte-addressability with persistence• The huge explosion of data in diverse fields require fast analysis and storage• NVMs provide the opportunity to build high-throughput storage systems for data-intensive

applications• Storage technology is moving rapidly towards NVM

[*] http://www.enterprisetech.com/2014/08/06/ flashtec-nvram-15-million-iops-sub-microsecond- latency/

Page 6: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 6Network Based Computing Laboratory

NVRAM Emulation Techniques

Emulate Persistent Memory over

DRAM

Latency Model

Hardware Emulator

Injecting microcode for stall

Software-Created Delays

Byte-Addressable Memory

Add delay on flush

Block-based I/O

Add delay on sync

Throughput Model

Hardware Emulator

memory controller-based bandwidth

throttle

Software-Created Delays

Spin-loop delay for bandwidth throttle

Page 7: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 7Network Based Computing Laboratory

• Latency Model

– slower memory writesPCM : clflush + delayPCM-Disk : msync + delay

– Delays inserted using a spin-loop (RDTSCP) or NOPS

– E.g., Mnemosyne1 Library, PCMSIM2, etc.

• Throughput Model

– Throttle bandwidth by inserting delays

– Delays inserted using a spin-loop (RDTSCP) or NOPS

– E.g., Mnemosyne PCMDisk1

Software-based NVRAM Emulation

Page 8: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 8Network Based Computing Laboratory

• Popular methods employed by recent works to emulate NVRAM performance model over DRAM

• Two ways: – Emulate byte-addressable NVRAM over DRAM

– Emulate block-based NVM device over DRAM

NVRAM Emulation based on DRAM

Application

Virtual File System

Block Device PCMDisk(RAM-Disk + Delay)

DRAM

mmap/memcpy/msyncApplication

Persistent Memory Library

Clflush + Delay

DRAM

pmem_memcpy_persist

Load/storeLoad/Store

open/read/write/close

Page 9: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 9Network Based Computing Laboratory

Performance Evaluation of memcpy over PCM

• Latency Comparison of memcpy operations with NVRAM Latency and Throughput emulation models for PCM (PCM-write-delay = 150 ns and PCM-read-delay = 50 ns)

• PCM-Mem (pmem.io NVML library over DRAM + delay) vs. Mnemosyne PCM-Disk

• PCM-Disk/PCM-Mem-Lat models show >6x overhead over RAMDisk with sync

0

5,000

10,000

15,000

20,000

64 256 1K 4K 16K 64K 256K 1M 4M

Mem

cpy

Late

ncy

(us)

Message Size (bytes)

DRAM-Volatile DRAM-With_Flush PCM-Mem-Lat

PCM-Mem-Thr RAM-Disk PCM-Disk

Page 10: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 10Network Based Computing Laboratory

• High-Performance Computing (HPC) has adopted advanced interconnects and protocols

– InfiniBand

– 10/40/100 Gigabit Ethernet/iWARP

– RDMA over Converged Enhanced Ethernet (RoCE)

• Very Good Performance

– Low latency (few micro seconds)

– High Bandwidth (100 Gb/s with EDR InfiniBand)

– Low CPU overhead (5-10%)

• OpenFabrics software stack with IB, iWARP and RoCE interfaces are driving HPC systems

High-Performance Interconnects and Protocols

Page 11: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 11Network Based Computing Laboratory

• RDMA for Apache Spark

• RDMA for Apache Hadoop 2.x (RDMA-Hadoop-2.x)– Plugins for Apache, Hortonworks (HDP) and Cloudera (CDH) Hadoop distributions

• RDMA for Apache HBase

• RDMA for Memcached (RDMA-Memcached)

• RDMA for Apache Hadoop 1.x (RDMA-Hadoop)

• OSU HiBD-Benchmarks (OHB)

– HDFS, Memcached, HBase, and Spark Micro-benchmarks

• http://hibd.cse.ohio-state.edu

• Users Base: 215 organizations from 29 countries

• More than 21,000 downloads from the project site

The High-Performance Big Data (HiBD) Project

Available for InfiniBand and RoCE

Significant performance improvement with ‘RDMA+DRAM’ compared to

default Sockets-based designs; How about RDMA+NVRAM?

Page 12: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 12Network Based Computing Laboratory

• Understanding NVRAM and RDMA• NRCIO: NVM-aware RDMA-based Communication

and I/O Schemes• NRCIO for Big Data Analytics• Conclusion and Q&A

Presentation Outline

Page 13: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 13Network Based Computing Laboratory

Design Scope (NVM for RDMA)

D-to-N over RDMA N-to-D over RDMA N-to-N over RDMA

D-to-N over RDMA: Communication buffers for client are allocated in DRAM; Server uses NVMN-to-D over RDMA: Communication buffers for client are allocated in NVM; Server uses DRAMN-to-N over RDMA: Communication buffers for client and server are allocated in NVM

Client Server Client Server Client Server

D-to-D over RDMA: Communication buffers for client and server are allocated in DRAM (Common)

Page 14: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 14Network Based Computing Laboratory

NVRAM-aware Communication in NRCIONRCIO Send/Recv over NVRAM NRCIO RDMA_Read over NVRAM

Page 15: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 15Network Based Computing Laboratory

NRCIO Send/Recv Emulation over PCM

• Comparison of communication latency using NRCIO send/receive semantics over InfiniBand QDR network and PCM memory

• High communication latencies due to slower writes to non-volatile persistent memory• NVRAM-to-Remote-NVRAM (NVRAM-NVRAM) => ~10x overhead vs. DRAM-DRAM• DRAM-to-Remote-NVRAM (DRAM-NVRAM) => ~8x overhead vs. DRAM-DRAM• DRAM-to-Remote-NVRAM (DRAM-NVRAM) => ~4x overhead vs. DRAM-DRAM

0

20000

40000

60000

80000

100000

120000

140000

1 2 4 8 16 32 64 128 256 512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M

Late

ncy

(us)

IB Send/Recv Emulation over PCM

DRAM-DRAM NVRAM-DRAMDRAM-NVRAM NVRAM-NVRAMDRAM-SSD-Msync_Per_Line DRAM-SSD-Msync_Per_8KPageDRAM-SSD-Msync_Per_4KPage

Page 16: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 16Network Based Computing Laboratory

NRCIO RDMA-Read Emulation over PCM

0

20000

40000

60000

80000

100000

120000

140000

1 2 4 8 16 32 64 128 256 512 1K 2K 4K 8K 16K 32K 64K 128K 256K 512K 1M 2M

Late

ncy

(us)

Message Size (bytes)IB RDMA_READ Emulation over PCM

DRAM-DRAM NVRAM-DRAMDRAM-NVRAM NVRAM-NVRAMDRAM-SSD-Msync_Per_Line DRAM-SSD-Msync_Per_8KPageDRAM-SSD-Msync_Per_4KPage

• Communication latency with NRCIO RDMA-Read over InfiniBand QDR + PCM memory• Communication overheads for large messages due to slower writes into NVRAM from

remote memory; similar to Send/Receive• RDMA-Read outperforms Send/Receive for large messages; as observed for DRAM-DRAM

Page 17: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 17Network Based Computing Laboratory

• Understanding NVRAM and RDMA• NRCIO: NVM-aware RDMA-based Communication

and I/O Schemes• NRCIO for Big Data Analytics• Conclusion and Q&A

Presentation Outline

Page 18: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 18Network Based Computing Laboratory

• Files are divided into fixed sized blocks– Blocks divided into packets

• NameNode: stores the file system namespace• DataNode: stores data blocks in local storage

devices• Uses block replication for fault tolerance

– Replication enhances data-locality and read throughput

• Communication and I/O intensive• Java Sockets based communication• Data needs to be persistent, typically on

SSD/HDDNameNode

DataNodes

Client

Opportunities of Using NVRAM+RDMA in HDFS

Page 19: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 19Network Based Computing Laboratory

Can HDFS be benefited by fully exploiting the byte-addressability of NVM?

• In-memory storage in HDFS is becoming popular– Data persistence is challenging

• HDFS stores files in local storage

– Competition for physical memory

• HPC clusters usually equipped with high performance interconnects and protocols (e.g. RDMA) and parallel file systems like Lustre

• NVM is also emerging and making its way into HPC systems

– Non-volatile and byte-addressable

NVMs becoming popular in NVMe SSD

12%

HDFS block I/O time

NVRAMDisk = RAMDisk backed by NVM

Requires re-assessment of the design choices for HDFS!

Page 20: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 20Network Based Computing Laboratory

Design Overview of NVM and RDMA-aware HDFS (NVFS)• Design Features

• RDMA over NVM• HDFS I/O with NVM

• Block Access• Memory Access

• Hybrid design• NVM with SSD as a hybrid

storage for HDFS I/O• Co-Design with Spark and HBase

• Cost-effectiveness• Use-case

Applications and Benchmarks

Hadoop MapReduce Spark HBase

Co-Design(Cost-Effectiveness, Use-case)

RDMAReceiver

RDMASender

DFSClientRDMA

Replicator

RDMAReceiver

NVFS-BlkIO

Writer/Reader

NVM

NVFS-MemIO

SSD SSD SSD

NVM and RDMA-aware HDFS (NVFS)DataNode

N. S. Islam, M. W. Rahman , X. Lu, and D. K. Panda, High Performance Design for HDFS with Byte-Addressability of NVM and RDMA, 24th International Conference on Supercomputing (ICS), June 2016

Page 21: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 21Network Based Computing Laboratory

Evaluation with Hadoop MapReduce

0

50

100

150

200

250

300

350

Write Read

Aver

age

Thro

ughp

ut (M

Bps) HDFS (56Gbps)

NVFS-BlkIO (56Gbps)

NVFS-MemIO (56Gbps)

• TestDFSIO on SDSC Comet (32 nodes)– Write: NVFS-MemIO gains by 4x over

HDFS

– Read: NVFS-MemIO gains by 1.2x over HDFS

TestDFSIO

0

200

400

600

800

1000

1200

1400

Write Read

Aver

age

Thro

ughp

ut (M

Bps) HDFS (56Gbps)

NVFS-BlkIO (56Gbps)

NVFS-MemIO (56Gbps)

4x

1.2x

4x

2x

SDSC Comet (32 nodes) OSU Nowlab (4 nodes)

• TestDFSIO on OSU Nowlab (4 nodes)– Write: NVFS-MemIO gains by 4x over

HDFS

– Read: NVFS-MemIO gains by 2x over HDFS

Page 22: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 22Network Based Computing Laboratory

Evaluation with HBase

0100200300400500600700800

8:800K 16:1600K 32:3200K

Thro

ughp

ut (o

ps/s

)

Cluster Size : No. of Records

HDFS (56Gbps) NVFS (56Gbps)

HBase 100% insert

0

200

400

600

800

1000

1200

8:800K 16:1600K 32:3200K

Thro

ughp

ut (o

ps/s

)

Cluster Size : Number of RecordsHBase 50% read, 50% update

• YCSB 100% Insert on SDSC Comet (32 nodes)– NVFS-BlkIO gains by 21% by storing only WALs to NVM

• YCSB 50% Read, 50% Update on SDSC Comet (32 nodes)– NVFS-BlkIO gains by 20% by storing only WALs to NVM

20%21%

Page 23: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 23Network Based Computing Laboratory

Opportunities to Use NVRAM+RDMA in MapReduce

Disk Operations• Map and Reduce Tasks carry out the total job execution

– Map tasks read from HDFS, operate on it, and write the intermediate data to local disk (persistent)– Reduce tasks get these data by shuffle from NodeManagers, operate on it and write to HDFS (persistent)

• Communication and I/O intensive; Shuffle phase uses HTTP over Java Sockets; I/O operations take place in SSD/HDD typically

Bulk Data Transfer

Page 24: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 24Network Based Computing Laboratory

Opportunities to Use NVRAM in MapReduce-RDMA Design

Inpu

t File

s

Out

put F

iles

Inte

rmed

iate

Dat

a

Map Task

Read MapSpill

Merge

Map Task

Read MapSpill

Merge

Reduce Task

Shuffle ReduceIn-

Mem Merge

Reduce Task

Shuffle ReduceIn-

Mem Merge

RDMA

All Operations are In-Memory

Opportunities exist to improve the

performance with NVRAM

Page 25: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 25Network Based Computing Laboratory

NVRAM-Assisted Map Spilling in MapReduce-RDMAIn

put F

iles

Out

put F

iles

Inte

rmed

iate

Dat

a

Map Task

Read MapSpill

Merge

Map Task

Read MapSpill

Merge

Reduce Task

Shuffle ReduceIn-

Mem Merge

Reduce Task

Shuffle ReduceIn-

Mem Merge

RDMANVR

AM

Minimizes the disk operations in Spill phase Final merged output is still written to intermediate data storage for maintaining similar fault-tolerance

M. W. Rahman, N. S. Islam, X. Lu, and D. K. Panda, Can Non-Volatile Memory Benefit MapReduce Applications on HPC Clusters? PDSW-DISCS, with SC 2016.

Page 26: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 26Network Based Computing Laboratory

Comparison with Sort and TeraSort

• RMR-NVM achieves 2.37x benefit for Map phase compared to RMR and MR-IPoIB; overall benefit 55% compared to MR-IPoIB, 28% compared to RMR

2.37x

55%

2.48x

51%

• RMR-NVM achieves 2.48x benefit for Map phase compared to RMR and MR-IPoIB; overall benefit 51% compared to MR-IPoIB, 31% compared to RMR

Page 27: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 27Network Based Computing Laboratory

Evaluation of Intel HiBench Workloads• We evaluate different HiBench

workloads with Huge data sets on 8 nodes

• Performance benefits for Shuffle-intensive workloads compared to MR-IPoIB:

– Sort: 42% (25 GB)

– TeraSort: 39% (32 GB)

– PageRank: 21% (5 million pages)

• Other workloads: – WordCount: 18% (25 GB)

– KMeans: 11% (100 million samples)

Page 28: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 28Network Based Computing Laboratory

Evaluation of PUMA Workloads

• We evaluate different PUMA workloads on 8 nodes with 30GB data size

• Performance benefits for Shuffle-intensive workloads compared to MR-IPoIB :

– AdjList: 39%

– SelfJoin: 58%

– RankedInvIndex: 39%

• Other workloads: – SeqCount: 32%

– InvIndex: 18%

Page 29: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 29Network Based Computing Laboratory

• Understanding NVRAM and RDMA• NRCIO: NVM-aware RDMA-based Communication

and I/O Schemes• NRCIO for Big Data Analytics• Conclusion and Q&A

Presentation Outline

Page 30: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 30Network Based Computing Laboratory

Conclusion and Future Work• Exploring NVM-aware RDMA-based Communication and I/O Schemes for

Big Data Analytics• Proposed a new library, NRCIO (work-in-progress)• Re-design HDFS storage architecture with NVRAM• Re-design RDMA-MapReduce with NVRAM• Results are promising• Further optimizations in NRCIO• Co-design with more Big Data analytics frameworks

Page 31: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 31Network Based Computing Laboratory

The 3rd International Workshop on High-Performance Big Data Computing (HPBDC)

HPBDC 2017 will be held with IEEE International Parallel and Distributed Processing Symposium (IPDPS 2017), Orlando, Florida USA, May, 2017

Keynote Speaker: Prof. Satoshi Matsuoka, Tokyo Institute of Technology, Japan

Panel Moderator: Prof. Jianfeng Zhan (ICT/CAS)Panel Topic: Sunrise or Sunset: Exploring the Design Space of Big Data Software Stack

Panel Members (Confirmed so far): Prof. Geoffrey C. Fox (Indiana University Bloomington); Dr. Raghunath Nambiar (Cisco); Prof. D. K. Panda (The Ohio State University)

Six Regular Research Papers and One Short Research PapersSession I: High-Performance Graph Processing

Session II: Benchmarking and Performance Analysis

http://web.cse.ohio-state.edu/~luxi/hpbdc2017

Page 32: NVM-aware RDMA-based Communication and I/O Schemes for … · 2017-03-31 · Spark, HBase, and many others • Model scales but high amount of communication and I/O can be further

NVMW ‘17 32Network Based Computing Laboratory

{luxi, panda}@cse.ohio-state.edu

http://www.cse.ohio-state.edu/~luxi

http://www.cse.ohio-state.edu/~panda

Thank You!

Network-Based Computing Laboratoryhttp://nowlab.cse.ohio-state.edu/

The High-Performance Big Data Projecthttp://hibd.cse.ohio-state.edu/