Commit c5840d77 authored by John Kariuki's avatar John Kariuki Committed by Jim Harris
Browse files

test/bdev_perf: disable zcopy by default



Prior to this patch the bdevperf application enabled using the zcopy API
by default. This means that on bdevs that don't natively support zcopy the
API emulates zero-copy by allocating a buffer. In my test environment, I
measured a 25% decrease in IOPS when zcopy was enabled. This patch changes
the default value so that zcopy is disabled by default. For bdevs that support
zcopy, use the -Z flag to enable using zcopy API.

Change-Id: Ib7e5c24f76eb16ffef038687daca58c0ffad1c1c
Signed-off-by: default avatarJohn Kariuki <John.K.Kariuki@intel.com>
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/4324


Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
Reviewed-by: default avatarShuhei Matsumoto <shuhei.matsumoto.xt@hitachi.com>
Reviewed-by: default avatarBen Walker <benjamin.walker@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
parent c0bf9314
Loading
Loading
Loading
Loading
+7 −0
Original line number Diff line number Diff line
@@ -131,6 +131,13 @@ library now no longer exists.
The contents of the bdev_rpc library have been moved to the bdev library. The app_rpc
library now no longer exists.

The bdevperf application now disables the zcopy API by default. Prior to this change,
bdevperf enabled using the zcopy API by default which caused a performance impact of
up to 25% on bdevs that don't natively support zcopy because the API emulates zero-copy
by allocating a buffer. The bdevperf `-x` param was renamed to `-Z` and the default
value changed to false. For bdevs that support zcopy, use the -Z flag to enable
using zcopy API.

### nvmf

Add 'no_wr_batching' parameter to 'spdk_nvmf_transport_opts' struct to disable
+5 −5
Original line number Diff line number Diff line
@@ -80,7 +80,7 @@ static uint64_t g_show_performance_ema_period = 0;
static int g_run_rc = 0;
static bool g_shutdown = false;
static uint64_t g_shutdown_tsc;
static bool g_zcopy = true;
static bool g_zcopy = false;
static struct spdk_thread *g_master_thread;
static int g_time_in_sec = 0;
static bool g_mix_specified = false;
@@ -1929,8 +1929,8 @@ bdevperf_parse_arg(int ch, char *arg)
		g_job_bdev_name = optarg;
	} else if (ch == 'z') {
		g_wait_for_tests = true;
	} else if (ch == 'x') {
		g_zcopy = false;
	} else if (ch == 'Z') {
		g_zcopy = true;
	} else if (ch == 'A') {
		g_abort = true;
	} else if (ch == 'C') {
@@ -1996,7 +1996,7 @@ bdevperf_usage(void)
	printf(" -S <period>               show performance result in real time every <period> seconds\n");
	printf(" -T <bdev>                 bdev to run against. Default: all available bdevs.\n");
	printf(" -f                        continue processing I/O even after failures\n");
	printf(" -x                        disable using zcopy bdev API for read or write I/O\n");
	printf(" -Z                        enable using zcopy bdev API for read or write I/O\n");
	printf(" -z                        start bdevperf, but wait for RPC to start tests\n");
	printf(" -A                        abort the timeout I/O\n");
	printf(" -C                        enable every core to send I/Os to each bdev\n");
@@ -2112,7 +2112,7 @@ main(int argc, char **argv)
	opts.rpc_addr = NULL;
	opts.shutdown_cb = spdk_bdevperf_shutdown_cb;

	if ((rc = spdk_app_parse_args(argc, argv, &opts, "xzfq:o:t:w:k:ACM:P:S:T:j:", NULL,
	if ((rc = spdk_app_parse_args(argc, argv, &opts, "Zzfq:o:t:w:k:ACM:P:S:T:j:", NULL,
				      bdevperf_parse_arg, bdevperf_usage)) !=
	    SPDK_APP_PARSE_ARGS_SUCCESS) {
		return rc;