Spdk/examples/nvme/fio_plugin
Daniel Verkamp 44e60dc47d build: consolidate library outputs in build/lib
Make it easier to use SPDK libraries by putting them all in a single
directory that can be added with -L rather than scattered around the
source tree.

Change-Id: I5c0f5dd6e7058b5f92fa9bc41548190ffc064761
Signed-off-by: Daniel Verkamp <daniel.verkamp@intel.com>
2016-11-17 13:15:09 -07:00
..
.gitignore nvme: Add an fio plugin 2016-05-18 13:51:36 -07:00
example_config.fio nvme: Add an fio plugin 2016-05-18 13:51:36 -07:00
fio_plugin.c nvme: expand probe information to a struct 2016-11-02 14:15:02 -07:00
Makefile build: consolidate library outputs in build/lib 2016-11-17 13:15:09 -07:00
README.md fio_plugin: add norandommap=1 recommendation to README 2016-08-02 13:31:38 -07:00

Compiling

First, clone the fio source repository from http://github.com/axboe/fio

git clone http://github.com/axboe/fio

Then check out the fio 2.8 tag

cd fio && git checkout fio-2.8

Finally, compile the code with

./configure && make

Next, edit the CONFIG file located in the root of the SPDK repository and set CONFIG_FIO_PLUGIN to y and FIO_SOURCE_DIR to the location of the fio repository that was just created.

Further, you'll need to build DPDK with -fPIC set. You can do this by modifying your DPDK config file (i.e. config/defconfig_x86_64-native-linuxapp-gcc) to include the line

EXTRA_CFLAGS=-fPIC

At this point, build SPDK as per normal. The fio plugin will be placed in the same directory as this README.

Usage

To use the SPDK fio plugin with fio, simply set the following in the fio configuration file (see example_config.fio in the same directory as this README).

ioengine=<path to fio_plugin binary>

To select NVMe devices, you simply pass an identifier as the filename in the format

domain.bus.slot.func/namespace

Remember that NVMe namespaces start at 1, not 0! Also, the notation uses '.' throughout, not ':'. For example - 0000.04.00.0/1.

Currently the fio_plugin is limited to a single thread, so only one job is supported.

When testing random workloads, it is recommended to set norandommap=1. fio's random map processing consumes extra CPU cycles which will degrade performance over time with the fio_plugin since all I/O are submitted and completed on a single CPU core.