2016-04-13 00:58:29 +00:00
|
|
|
Compiling
|
|
|
|
----------
|
|
|
|
|
2017-04-19 20:01:22 +00:00
|
|
|
First, clone the fio source repository from https://github.com/axboe/fio
|
2016-04-13 00:58:29 +00:00
|
|
|
|
2017-04-19 20:01:22 +00:00
|
|
|
git clone https://github.com/axboe/fio
|
2016-04-13 00:58:29 +00:00
|
|
|
|
2017-02-16 07:24:37 +00:00
|
|
|
Then check out the fio 2.18 tag
|
2016-04-13 00:58:29 +00:00
|
|
|
|
2017-02-16 07:24:37 +00:00
|
|
|
cd fio && git checkout fio-2.18
|
2016-04-13 00:58:29 +00:00
|
|
|
|
|
|
|
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
|
2016-06-22 00:08:27 +00:00
|
|
|
DPDK config file (i.e. config/defconfig_x86_64-native-linuxapp-gcc) to include the line
|
2016-04-13 00:58:29 +00:00
|
|
|
|
|
|
|
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
|
|
|
|
------
|
|
|
|
|
2017-06-13 18:50:32 +00:00
|
|
|
To use the SPDK fio plugin with fio, specify the plugin binary using LD_PRELOAD when running
|
|
|
|
fio and set ioengine=spdk in the fio configuration file (see example_config.fio in the same
|
|
|
|
directory as this README).
|
2016-04-13 00:58:29 +00:00
|
|
|
|
2017-06-13 18:50:32 +00:00
|
|
|
LD_PRELOAD=<path to fio_plugin binary> fio
|
2016-04-13 00:58:29 +00:00
|
|
|
|
|
|
|
To select NVMe devices, you simply pass an identifier as the filename in the format
|
|
|
|
|
2017-06-27 21:15:59 +00:00
|
|
|
filename=key=value [key=value] ... ns=value
|
2016-04-13 00:58:29 +00:00
|
|
|
|
2017-03-27 05:33:06 +00:00
|
|
|
Do not have any ':' in filename, otherwise it will be spilt into several file names. Also the
|
2017-06-27 21:15:59 +00:00
|
|
|
NVMe namespaces start at 1, not 0! The namespace must also be specified at the end.
|
|
|
|
|
|
|
|
Local PCIe NVMe devices will be specified using a PCI domain.bus.slot.func traddr format. For example:
|
|
|
|
|
|
|
|
filename=trtype=PCIe traddr=0000.04.00.0 ns=1
|
|
|
|
|
|
|
|
Remote devices accessed via NVMe over Fabrics will be specified based on the following example:
|
|
|
|
|
|
|
|
filename=trtype=RDMA adrfam=IPv4 traddr=192.168.100.8 trsvcid=4420 ns=1
|
2016-08-02 16:28:44 +00:00
|
|
|
|
2017-05-02 04:25:50 +00:00
|
|
|
Currently the SPDK fio plugin is limited to thread usage model, so fio jobs must also specify thread=1
|
|
|
|
when using the SPDK fio plugin.
|
2016-08-02 16:28:44 +00:00
|
|
|
|
2017-06-13 18:50:32 +00:00
|
|
|
fio also currently has a race condition on shutdown if dynamically loading the ioengine by specifying the
|
|
|
|
engine's full path via the ioengine parameter - LD_PRELOAD is recommended to avoid this race condition.
|
|
|
|
|
2016-08-02 16:28:44 +00:00
|
|
|
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.
|