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 <karol.latecki@intel.com>
Signed-off-by: Michal Berger <michal.berger@intel.com>
Change-Id: I1a445379e755939875aebe97a6360ec0b0586287
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16267
Reviewed-by: Konrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: Jim Harris <james.r.harris@intel.com>
Tested-by: SPDK CI Jenkins <sys_sgci@intel.com>
This commit is contained in:
Karol Latecki 2023-01-12 09:09:52 +01:00 committed by Tomasz Zawadzki
parent e54ffeb6c5
commit c6d73b5aaf
2 changed files with 17 additions and 1 deletions

View File

@ -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

View File

@ -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
;;