Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off),...

33
Ziye Yang NPG, DCG, Intel

Transcript of Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off),...

Page 1: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Ziye Yang

NPG, DCG, Intel

Page 2: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

2

Agenda

• What is SPDK?

• Accelerated NVMe-oF via SPDK

• Conclusion

Page 3: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

3

Agenda

• What is SPDK?

• Accelerated NVMe-oF via SPDK

• Conclusion

Page 4: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

4

Storage Performance

Development Kit

Scalable and Efficient Software Ingredients

• User space, lockless, polled-mode components

• Up to millions of IOPS per core

• Designed to extract maximum performance from non-volatile media

Storage Reference Architecture

• Optimized for latest generation CPUs and SSDs

• Open source composable building blocks (BSD licensed)

• Available via spdk.io

Page 5: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

5

Benefits of using SPDK

SPDKmore performance

from Intel CPUs, non-volatile media, and

networking

FASTER TTM/LESS RESOURCES

than developing componentsfrom scratch

10X MORE IOPS/coreUp to for NVMe-oF* vs. Linux kernel

as NVM technologies increase in performanceFuture ProofingProvides

for NVMe vs. Linux kernel8X MORE IOPS/coreUp to

Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured usingspecific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance teststo assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products. For more information go to http://www.intel.com/performance

350%Up to for RocksDB workloadsBETTER Tail Latency

Page 6: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

6

Architecture

Drivers

StorageServices

StorageProtocols

iSCSI Target

NVMe-oF*Target

SCSI

vhost-scsiTarget

NVMe

NVMe Devices

Blobstore

NVMe-oF*

Initiator

Intel® QuickDataTechnology

Driver

Block Device Abstraction (bdev)

Ceph RBD

Linux AIO

Logical Volumes

3rd Party

NVMe

NVMe* PCIeDriver

Released

New release 18.01

1H‘18

vhost-blkTarget

BlobFS

Integration

RocksDB

Ceph

Core

ApplicationFramework

GPT

PMDKblk

virtioscsi

VPP TCP/IP

QEMU

Cinder

QoS

Linux nbdRDMA

DPDKEncryption

virtioblk

Page 7: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133
Page 8: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Flexibility for user

Why an environment abstraction?

8

Page 9: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Environment abstraction• Memory allocation (pinned for DMA) and

address translation

• PCI enumeration and resource mapping

• Thread startup (pinned to cores)

• Lock-free ring and memory pool data structures

9

env.c

pci.c

env.h

init.c

pci_ioat.c

pci_nvme.c

pci_virtio.c

threads.c

vtophy.c

Page 10: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Configurable:

./configure --with-env=...

Interface defined in spdk/env.h

Default implementation uses DPDK(lib/env_dpdk)

Environment abstraction

Flexibility: Decoupling and DPDK enhancements

10

env.c

pci.c

env.h

init.c

pci_ioat.c

pci_nvme.c

pci_virtio.c

threads.c

vtophy.c

Page 11: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133
Page 12: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

The SPDK app Framework provides the glue

How do we combine SPDK components?

12

Page 13: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

App Framework Components

13

Reactor

Poller

Event

I/O Channel

Page 14: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Reactor 1Reactor 0 Reactor N…

Core 0 Core NCore 1

Po

ller

Events

Po

ller

… Po

ller

… Po

ller

I/O Device I/O DeviceI/O

Device…

Events Events

14

I/O Device

Page 15: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

PollerEssentially a “task” running on a reactor

Primarily checks hardware for async events

Can run periodically on a timer

Example: poll completion queue

Callback runs to completion on reactor thread

Completion handler may send an event

CQ

I/O Device

Poller

I/O completion callback

Submit I/O

SQ

15

Page 16: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Event

Reactor 1Reactor 0 Reactor N…

Core 0 Core NCore 1

Po

ller

Events

Po

ller

Po

ller

… Po

ller

… Po

ller

I/O Device I/O Device I/O Device…

Events Events

16

Page 17: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

Poller

EventCross-thread communication

Function pointer + arguments

One-shot message passed between reactors

Multi-producer/single-consumer ring

Runs to completion on reactor thread

Reactor A

Events

Reactor B

Allocate andcall event

Execute and free event

17

Page 18: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

I/O ChannelAbstracts hardware I/O queues

Register I/O devices

Create I/O channel per thread/device combination

Provides hooks for driver resource allocation

I/O channel creation drives poller creation

Pervasive in SPDK

18

I/O Device

Page 19: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

NVMe over Fabrics Target ExampleAcceptor network poller handles connect events

Connection event registers new poller

Reactor 1

Events

Reactor 0

Events

Acceptor Poller

Network

ConnectEvent

Connection

Connection Poller

19

Page 20: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

NVMe over Fabrics Target ExampleAcceptor network poller handles connect events

Connection event registers new poller

I/O request arrives over network

I/O submitted to storage

Storage device poller checks completions

Response sent

All asynchronous work is driven by pollers

Connection Poller

Reactor 1

Events

Storage Poller

Storage

Reactor 0

Events

Acceptor Poller

Network

ConnectEvent

I/O

20

Page 21: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

21

Agenda

• What is SPDK?

• Accelerated NVMe-oF via SPDK

• Conclusion

Page 22: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

22

NVMe over Fabrics Target

• Released July 2016 (with spec)

• Hardening:

o Intel test infrastructure Discovery simplificationCorrectness & kernel interop

• Performance improvements:

o Read latency improvementScalability validation (up to 150Gbps)

o Event Framework enhancements

o Multiple connection performance improvement

NVMe over Fabrics Host (Initiator)

• New component added in Dec 2016

• Performance improvements

o Eliminate copy: now true zero-copy

o SGL (single SGL element)

SPDK NVMe-oF Components

Page 23: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

23

Existing work: RDMA transport

• DPDK components used which is encapsulated in libspdk_env_dpdk.a, e.g.,

o PCI device management

o CPU/thread scheduling

o Memory management (e.g., lock free rings)

o Log management

Upcoming work: TCP transport

• Kernel based TCP transport

• VPP/DPDK based user space TCP transport

o Use DPDK Ethernet PMDs

o Use user space TCP/IP stack (e.g., VPP)

SPDK NVMe-oF transport work

Page 24: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

24

NVMe-oF Target Throughput Performance (RDMA)

SPDK reduces NVMe over Fabrics software overhead up to 10x!

NVMe* over Fabrics Target Features

Realized Benefit

Utilizes NVM Express* (NVMe) Polled Mode Driver

Reduced overheadper NVMe I/O

RDMA Queue Pair Polling

No interrupt overhead

Connections pinned to CPU cores

No synchronization overhead

3

30

0

5

10

15

20

25

30

35

0

500,000

1,000,000

1,500,000

2,000,000

2,500,000

3,000,000

3,500,000

4,000,000

SPDK Kernel

SPDK vs. Kernel NVMe-oF I/O

Efficiency

IOPS Cores

3x 50GbE Line Rate

System Configuration: Target system: Supermicro SYS-2028U-TN24R4T+, 2x Intel® Xeon® E5-2699v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology enabled, 8x 8GB DDR4 2133 MT/s, 1 DIMM per channel, 12x Intel® P3700 NVMe SSD (800GB) per socket, -1H0 FW; Network: Mellanox* ConnectX-4 LX 2x25Gb RDMA, direct connection between initiators and target; Initiator OS: CentOS* Linux* 7.2, Linux kernel 4.10.0, Target OS (SPDK): Fedora 25, Linux kernel 4.9.11, Target OS (Linux kernel): Fedora 25, Linux kernel 4.9.11 Performance as measured by: fio, 4KB Random Read I/O, 2 RDMA QP per remote SSD, Numjobs=4 per SSD, Queue Depth: 32/job. SPDK commit ID: 4163626c5c

Page 25: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

25

NVM Express* Driver Software Overhead

System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133 MT/s, 1 DIMM per channel, CentOS* Linux* 7.2, Linux kernel 4.7.0-rc1, 1x Intel® P3700 NVMe SSD (800GB), 4x per CPU socket, FW 8DV10102, I/O workload 4KB random read, Queue Depth: 1 per SSD, Performance measured by Intel using SPDK overhead tool, Linux kernel data using Linux AIO

SPDK reduces NVM Express* (NVMe) software overhead up to 10x!

0

1000

2000

3000

4000

5000

6000

Linux Kernel SPDK

NA

NO

SE

CO

ND

S

Submit

Kernel Source of Overhead

SPDK Approach

Interrupts Asynchronous Polled Mode

Synchronization Lockless

System Calls User Space Hardware Access

DMA Mapping Hugepages

Generic Block Layer

Specific for Flash Latencies

Page 26: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

26

NVM Express* Driver Throughput Scalability

System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133 MT/s, 1 DIMM per channel, CentOS* Linux* 7.2, Linux kernel 4.10.0, 8x Intel® P3700 NVMe SSD (800GB), 4x per CPU socket, FW 8DV101H0, I/O workload 4KB random read, Queue Depth: 128 per SSD, Performance measured by Intel using SPDK perf tool, Linux kernel data using Linux AIO

0

500

1000

1500

2000

2500

3000

3500

4000

1 2 3 4 5 6 7 8

Th

rou

gh

pu

t (K

IOp

s)

Number of Intel SSD DC P3700

I/O Performance on

Single Intel® Xeon® core

Linux Kernel SPDK

SPDK saturates 8 NVMe SSDs with a single CPU core!

• Systems with multiple NVM Express*

(NVMe) SSDs capable of millions of I/O per second

• Results in many cores of software overhead with kernel-based interrupt-driven driver model

• SPDK enables:

- more CPU cycles for storage services

- lower I/O latency

Page 27: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

SPDK Host + Target vs. Kernel Host + Target

117

128

14

7

13

8

0

5

10

15

20

25

30

Kernel NVMe-oF Target /

Kernel NVMe-oF Initiator

4K Random Read

SPDK NVMe-oF Target /

SPDK NVMe-oF Initiator

4K Random Read

Kernel NVMe-oF Target /

Kernel NVMe-oF Initiator

4K Random Write

SPDK NVMe-oF Target /

SPDK NVMe-oF Initiator

4K Random Write

La

ten

cy (

use

c)

Avg. I/O Round Trip Time

Kernel vs. SPDK NVMe-oF Stacks

Coldstream, Perf, qd=1

Local Fabric + Software

SPDK reduces Optane NVMe-oF latency by 44%, write latency by 36%!

System Configuration: 2x Intel® Xeon® E5-2695v4 (HT on, Intel® Speed Step enabled, Intel® Turbo Boost Technology enabled, 64GB DDR4 Memory, 8x 8GB DDR4 2400 MT/s, Ubuntu 16.04.1, Linux kernel 4.10.1, 1x 25GbE Mellanox 2P CX-4, CX-4 FW= 14.16.1020, mlx5_core= 3.0-1 driver, 1 ColdStream, connected to socket 0, 4KB Random Read I/0 1 initiators, each initiator connected to bx NVMe-oF subsystems using 2P 25GbE Mellanox. Performance measured by Intel using SPDK perf tool, 4KB Random Read I/O, Queue Depth: 1/NVMe-oF subsystem. numjobs 1, 300 sec runtime, direct=1, norandommap=1, FIO-2.12, SPDK commit # 42eade49 27

Page 28: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

SPDK NVMf Target

SPDK NVMe lib

Optane Controller

spdk_lib_read_start spdk_lib_read_complete

nvmf_read I/O start nvmf_read I/O complete

20 usec • 20 usec round trip time measured from NVMe-oFinitiator

• Out of 20usec, ~7 usec spent in NVMe controller

• 12-13 usec measured time in the fabric and kernel NVMe-oF initiator

• SPDK NVMf target adds just 100-200 nsec to fabric overhead

Disclaimer: Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products.

13.05 usec

13.15 usec

IO Read from Kernel NVMe-oFInitiator initiatorStart: 0 usec

6 usec

6.05 usec

*Other names and brands may be claimed as the property of others.

System Configuration: 2x Intel® Xeon® E5-2695v4 (HT on, Intel® Speed Step enabled, Intel® Turbo Boost Technology enabled, 64GB DDR4 Memory, 8x 8GB DDR4 2400 MT/s, Ubuntu 16.04.1, Linux kernel 4.10.1, 1x 25GbE Mellanox 2P CX-4, CX-4 FW= 14.16.1020, mlx5_core= 3.0-1 driver, 1 ColdStream, connected to socket 0, 4KB Random Read I/0 1 initiators, each initiator connected to bx NVMe-oF subsystems using 2P 25GbE Mellanox. Performance measured by Intel using SPDK perf tool, 4KB Random Read I/O, Queue Depth: 1/NVMe-oF subsystem. numjobs 1, 300 sec runtime, direct=1, norandommap=1, FIO-2.12, SPDK commit # 42eade49

NVMe-oF IO Latency Model, 4KB Random Read (Intel Optane SSD DC P4800X)SPDK Target + Kernel NVMe-oF Initiator

28

Page 29: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

SPDK NVMf Target

SPDK NVMe lib

Optane Controller

spdk_lib_read_start spdk_lib_read_complete

nvmf_read I/O start nvmf_read I/O complete

14 usec • 14 usec round trip time measured from NVMf client

• Out of 14usec, ~7 usec spent in NVMe controller

• 7 usec measured time in the fabric and SPDK NVMe-oFinitiator

• SPDK NVMf target adds just 100-200 nsec to fabric overhead

Disclaimer: Software and workloads used in performance tests may have been optimized for performance only on Intel microprocessors. Performance tests, such as SYSmark and MobileMark, are measured using specific computer systems, components, software, operations and functions. Any change to any of those factors may cause the results to vary. You should consult other information and performance tests to assist you in fully evaluating your contemplated purchases, including the performance of that product when combined with other products.

9.05 usec

9.15 usec

IO Read from SPDK NVMe-oFInititiator initiatorStart: 0 usec

2 usec

2.05 usec

*Other names and brands may be claimed as the property of others.

System Configuration: 2x Intel® Xeon® E5-2695v4 (HT on, Intel® Speed Step enabled, Intel® Turbo Boost Technology enabled, 64GB DDR4 Memory, 8x 8GB DDR4 2400 MT/s, Ubuntu 16.04.1, Linux kernel 4.10.1, 1x 25GbE Mellanox 2P CX-4, CX-4 FW= 14.16.1020, mlx5_core= 3.0-1 driver, 1 ColdStream, connected to socket 0, 4KB Random Read I/0 1 initiators, each initiator connected to bx NVMe-oF subsystems using 2P 25GbE Mellanox. Performance measured by Intel using SPDK perf tool, 4KB Random Read I/O, Queue Depth: 1/NVMe-oF subsystem. numjobs 1, 300 sec runtime, direct=1, norandommap=1, FIO-2.12, SPDK commit #42eade49

NVMe-oF IO Latency Model, 4KB Random Read (Intel Optane SSD DC P4800X)SPDK Target + SPDK NVMe-oF Initiator

29

Page 30: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

30

Agenda

• What is SPDK?

• Accelerated NVMe-oF via SPDK

• Conclusion

Page 31: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133

31

Conclusion

• In this presentation, we introduce

• SPDK library

• The accelerated NVMe-oF target built from SPDK library

• SPDK proves to be useful to accelerate storage applications equipped with NVMe based devices

• Call for action:

• Welcome to use SPDK in storage area (similar as using DPDK in network ) and contribute into SPDK community.

Page 32: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133
Page 33: Ziye Yang NPG, DCG, Intel€¦ · System Configuration: 2x Intel® Xeon® E5-2695v4 (HT off), Intel® Speed Step enabled, Intel® Turbo Boost Technology disabled, 8x 8GB DDR4 2133