SPDK (Storage Performance Development Kit) is an optimized storage reference architecture. It is initiated and developed by Intel.
SPDK provides a set of tools and libraries for writing high performance, scalable, user-mode storage applications. It achieves high performance by moving all of the necessary drivers into userspace and operating in a polled mode, like DPDK.
Hard drive latency is dramatically dropping down: HDD(SAS/SATA) ~10ms → SSD (SATA) ~0.1ms → SSD (NVMe) ~0.075ms
Bus width and command queue is increasing: SAS/SATA 6Gbps, 32 commands/queue → NVMe 24Gbps, 64k commands/queue
All these changes make software latency the major contributor to the whole latency stack in nowadays.
Architecture and subcomponents
Two key changes for SPDK to reduce latency caused by software stack:
Poll mode driver: Submits the request for a read or write, and then goes off to do other work, checking back at some interval to see if the I/O has yet been completed. This avoids the latency and overhead of using interrupts and allows the application to improve I/O efficiency
User space data process: Avoiding the kernel context switches and interrupts saves a significant amount of processing overhead, allowing more cycles to be spent doing the actual storing of the data.
Following is the software stack of SPDK:
Provides direct, zero-copy data transfer to and from NVMe SSDs. It controls NVMe devices by directly mapping the PCI BAR into the local process and performing MMIO. I/O is submitted asynchronously via queue pairs.
NVMe over Fabrics Target
User space application that presents block devices over the network using RDMA. It requires an RDMA-capable NIC with its corresponding OFED software package installed to run.
Implementation of the established specification for block traffic over Ethernet. Current version uses the kernel TCP/IP stack by default.
Block Device Abstraction Layer
This generic block device abstraction is the glue that connects the storage protocols to the various device drivers and block devices. Also provides flexible APIs for additional customer functionality (RAID, compression, dedup, and so on) in the block layer.
a driver module API for implementing bdev drivers
an application API for enumerating and claiming SPDK block devices and performance operations
bdev drivers for NVMe, malloc (ramdisk), Linux AIO and Ceph RBD
A persistent, power-fail safe block allocator designed to be used as the local storage system backing a higher level storage service, typically in lieu of a traditional filesystem.
This is a virtual device that VMs or databases could interact with.
Adds basic filesystem functionality like filenames on top of the blobstore.
It extends SPDK to present virtio storage controllers to QEMU-based VMs and process I/O submitted to devices attached to those controllers
A framework for writing asynchronous, polled-mode, shared-nothing server applications.
The event framework is intended to be optional; most other SPDK components are designed to be integrated into an application without specifically depending on the SPDK event library. The framework defines several concepts - reactors, events, and pollers.
This app should give you the detail disk info of attached NVMe storage.
# sudo ./examples/nvme/perf/perf -q 128 -s 4096 -w write -t 60 -c 0xFF -o 2048 -r 'trtype:PCIe traddr:0000:01:00.0' This will give SPDK performance data. With prior described HW/SW settings, following data are achieved (performance in MBps):
How to Uboot... I thought I would write this up as many developers using Layerscape, QoriQ and Qonverge devices will start with a boot loader as the first access to their own newly minted hardware. There are two paths here. The first is to get our SDK and find the uboot source in that, modify it as needed. This is time consuming as you need to build an image to have Yocto pull the source code, and you need to jump through some hoops to rebuild with yocto after making your own custom uboot.
The second is to go straight to the git repo, pull it and build with the cross compiler toolchain that seems most appropriate. This can be easier in general... To do this:
Step 1. Install your tools!
For example when compiling for ARM:
Go here and find a specific version, download and untar/zip