The wrapper glues execution of the perf/vhost tests in as simple form as possible. The arguments are meant to be passed either via env or the cmdline in a keyworded argument fashion. All defaults are embedded inside the configuration which is built by the wrapper itself. https://trello.com/c/HSoRtQkO/401-deprecate-vhost-performance-python-helper-script Signed-off-by: Michal Berger <michallinuxstuff@gmail.com> Change-Id: Iad94bfdd65cb8871b819351ddae65e647621fb30 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/12400 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Jim Harris <james.r.harris@intel.com>
52 lines
1.1 KiB
Bash
Executable File
52 lines
1.1 KiB
Bash
Executable File
#!/usr/bin/env bash
|
|
|
|
curdir=$(readlink -f "$(dirname "$0")")
|
|
rootdir=$(readlink -f "$curdir/../../../")
|
|
|
|
source "$rootdir/test/vhost/common.sh"
|
|
|
|
fio_conf() {
|
|
cat <<- FIO
|
|
[global]
|
|
ioengine=libaio
|
|
thread=1
|
|
group_reporting=1
|
|
direct=1
|
|
verify=0
|
|
norandommap=1
|
|
|
|
[perf_test]
|
|
stonewall
|
|
description="Vhost performance test for a given workload"
|
|
bs=${blksize:-4k}
|
|
rw=${rw:-randread}
|
|
rwmixread=${rwmixread:-70}
|
|
iodepth=${iodepth:-128}
|
|
time_based=1
|
|
ramp_time=${ramptime:-10}
|
|
runtime=${runtime:-10}
|
|
numjobs=${numjobs:-1}
|
|
# This option is meant to be sed'ed by the vhost's run_fio()
|
|
filename=
|
|
FIO
|
|
}
|
|
|
|
(($#)) && eval "$@"
|
|
|
|
perf_args+=("--vm-image=${vm_image:-$VM_IMAGE}")
|
|
perf_args+=("--ctrl-type=${ctrl_type:-spdk_vhost_scsi}")
|
|
perf_args+=(${split:+--use-split})
|
|
perf_args+=(${disk_map:+--disk-map="$disk_map"})
|
|
perf_args+=(${cpu_cfg:+--custom-cpu-cfg="$cpu_cfg"})
|
|
|
|
if [[ -n $extra_params ]]; then
|
|
perf_args+=($extra_params)
|
|
fi
|
|
|
|
trap 'rm -f "$curdir/fio.conf"' EXIT
|
|
|
|
fio_conf > "$curdir/fio.conf"
|
|
|
|
"$rootdir/test/vhost/perf_bench/vhost_perf.sh" \
|
|
"${perf_args[@]}" --fio-jobs="$curdir/fio.conf"
|