fio_plugin: enforce thread=1

The SPDK fio plugin only supports jobs as threads, not separate
processes.  So log an error and bail if --thread=1 is not
specified.

Signed-off-by: Jim Harris <james.r.harris@intel.com>
Change-Id: I318f924e0b7fbb76f11427a447dd7c5fc0ebc221
This commit is contained in:
Jim Harris 2017-04-04 08:35:10 -07:00 committed by Ben Walker
parent b512e01a50
commit 9ee30b87b7
2 changed files with 7 additions and 1 deletions

View File

@ -39,7 +39,8 @@ To select NVMe devices, you simply pass an identifier as the filename in the for
Remember that NVMe namespaces start at 1, not 0! Also, the notation uses '.' throughout, Remember that NVMe namespaces start at 1, not 0! Also, the notation uses '.' throughout,
not ':'. For example - 0000.04.00.0/1. not ':'. For example - 0000.04.00.0/1.
Currently the fio_plugin is limited to a single thread, so only one job is supported. Currently the SPDK fio plugin is limited to a single thread, so only one job is supported.
fio jobs must also specify thread=1 when using the SPDK fio plugin.
When testing random workloads, it is recommended to set norandommap=1. fio's random map 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 processing consumes extra CPU cycles which will degrade performance over time with

View File

@ -179,6 +179,11 @@ static int spdk_fio_setup(struct thread_data *td)
struct spdk_fio_thread *fio_thread; struct spdk_fio_thread *fio_thread;
struct spdk_env_opts opts; struct spdk_env_opts opts;
if (!td->o.use_thread) {
log_err("spdk: must set thread=1 when using spdk plugin\n");
return 1;
}
fio_thread = calloc(1, sizeof(*fio_thread)); fio_thread = calloc(1, sizeof(*fio_thread));
assert(fio_thread != NULL); assert(fio_thread != NULL);