From c6d73b5aaf45b49504b55da1e9ca7d6e188decb8 Mon Sep 17 00:00:00 2001 From: Karol Latecki Date: Thu, 12 Jan 2023 09:09:52 +0100 Subject: [PATCH] test/vhost: add iobuf options to performance test Recent changes done to iobuf and accel framework require us to adjust iobuf pool sizes when running tests with high number of VMs and Vhost controllers. Signed-off-by: Karol Latecki Signed-off-by: Michal Berger Change-Id: I1a445379e755939875aebe97a6360ec0b0586287 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16267 Reviewed-by: Konrad Sztyber Reviewed-by: Jim Harris Tested-by: SPDK CI Jenkins --- test/vhost/common.sh | 14 +++++++++++++- test/vhost/perf_bench/vhost_perf.sh | 4 ++++ 2 files changed, 17 insertions(+), 1 deletion(-) diff --git a/test/vhost/common.sh b/test/vhost/common.sh index 4a0d5025b..ff2403cbf 100644 --- a/test/vhost/common.sh +++ b/test/vhost/common.sh @@ -166,12 +166,24 @@ function vhost_run() { timing_enter vhost_start - $cmd & + iobuf_small_count=${iobuf_small_count:-16383} + iobuf_large_count=${iobuf_large_count:-2047} + + $cmd --wait-for-rpc & vhost_pid=$! echo $vhost_pid > $vhost_pid_file notice "waiting for app to run..." waitforlisten "$vhost_pid" "$vhost_dir/rpc.sock" + + "$rootdir/scripts/rpc.py" -s "$vhost_dir/rpc.sock" \ + iobuf_set_options \ + --small-pool-count="$iobuf_small_count" \ + --large-pool-count="$iobuf_large_count" + + "$rootdir/scripts/rpc.py" -s "$vhost_dir/rpc.sock" \ + framework_start_init + #do not generate nvmes if pci access is disabled if [[ "$cmd" != *"--no-pci"* ]] && [[ "$cmd" != *"-u"* ]] && $run_gen_nvme; then $rootdir/scripts/gen_nvme.sh | $rootdir/scripts/rpc.py -s $vhost_dir/rpc.sock load_subsystem_config diff --git a/test/vhost/perf_bench/vhost_perf.sh b/test/vhost/perf_bench/vhost_perf.sh index 5d316ecf4..a773276d1 100755 --- a/test/vhost/perf_bench/vhost_perf.sh +++ b/test/vhost/perf_bench/vhost_perf.sh @@ -85,6 +85,8 @@ function usage() { echo " NVME PCI BDF,Spdk Bdev Name,Split Count,VM List" echo " 0000:1a:00.0,Nvme0,2,0 1" echo " 0000:1b:00.0,Nvme1,2,2 3" + echo " --iobuf-small-pool-count=INT number of small buffers in the global pool" + echo " --iobuf-large-pool-count=INT number of large buffers in the global pool" echo "-x set -x for script debug" exit 0 } @@ -198,6 +200,8 @@ while getopts 'xh-:' optchar; do limit-kernel-vhost=*) kernel_cpus="${OPTARG#*=}" ;; custom-cpu-cfg=*) custom_cpu_cfg="${OPTARG#*=}" ;; disk-map=*) disk_map="${OPTARG#*=}" ;; + iobuf-small-pool-count=*) iobuf_small_count="${OPTARG#*=}" ;; + iobuf-large-pool-count=*) iobuf_large_count="${OPTARG#*=}" ;; *) usage $0 "Invalid argument '$OPTARG'" ;; esac ;;