Commit c6d73b5a authored by Karol Latecki's avatar Karol Latecki Committed by Tomasz Zawadzki
Browse files

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: default avatarKarol Latecki <karol.latecki@intel.com>
Signed-off-by: default avatarMichal Berger <michal.berger@intel.com>
Change-Id: I1a445379e755939875aebe97a6360ec0b0586287
Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/16267


Reviewed-by: default avatarKonrad Sztyber <konrad.sztyber@intel.com>
Reviewed-by: default avatarJim Harris <james.r.harris@intel.com>
Tested-by: default avatarSPDK CI Jenkins <sys_sgci@intel.com>
parent e54ffeb6
Loading
Loading
Loading
Loading
+13 −1
Original line number Diff line number Diff line
@@ -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
+4 −0
Original line number Diff line number Diff line
@@ -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
			;;