test/vhost_perf: allow multiple fio config files
Allow multiple fio config files and fun them sequentially in loop against provisioned Vhost+VMs setup. This should decrease total time needed for performance benchmarks as we can re-use current configuration rather than provision from scratch for each workload. Signed-off-by: Karol Latecki <karol.latecki@intel.com> Change-Id: I0c4e37f0bb9f49f7614c8001d74d72b99470c084 Reviewed-on: https://review.spdk.io/gerrit/c/spdk/spdk/+/1899 Tested-by: SPDK CI Jenkins <sys_sgci@intel.com> Reviewed-by: Tomasz Zawadzki <tomasz.zawadzki@intel.com> Reviewed-by: Ben Walker <benjamin.walker@intel.com>
This commit is contained in:
parent
652fe8a20b
commit
6d3ee83621
@ -44,7 +44,7 @@ function usage()
|
|||||||
echo " --fio-bin=PATH Path to FIO binary on host.;"
|
echo " --fio-bin=PATH Path to FIO binary on host.;"
|
||||||
echo " Binary will be copied to VM, static compilation"
|
echo " Binary will be copied to VM, static compilation"
|
||||||
echo " of binary is recommended."
|
echo " of binary is recommended."
|
||||||
echo " --fio-job=PATH Fio config to use for test."
|
echo " --fio-jobs=PATH Comma separated list of fio config files to use for test."
|
||||||
echo " --fio-iterations=INT Number of times to run specified workload."
|
echo " --fio-iterations=INT Number of times to run specified workload."
|
||||||
echo " --vm-memory=INT Amount of RAM memory (in MB) to pass to a single VM."
|
echo " --vm-memory=INT Amount of RAM memory (in MB) to pass to a single VM."
|
||||||
echo " Default: 2048 MB"
|
echo " Default: 2048 MB"
|
||||||
@ -151,7 +151,7 @@ while getopts 'xh-:' optchar; do
|
|||||||
case "$OPTARG" in
|
case "$OPTARG" in
|
||||||
help) usage $0 ;;
|
help) usage $0 ;;
|
||||||
fio-bin=*) fio_bin="--fio-bin=${OPTARG#*=}" ;;
|
fio-bin=*) fio_bin="--fio-bin=${OPTARG#*=}" ;;
|
||||||
fio-job=*) fio_job="${OPTARG#*=}" ;;
|
fio-jobs=*) fio_jobs="${OPTARG#*=}" ;;
|
||||||
fio-iterations=*) fio_iterations="${OPTARG#*=}" ;;
|
fio-iterations=*) fio_iterations="${OPTARG#*=}" ;;
|
||||||
vm-memory=*) vm_memory="${OPTARG#*=}" ;;
|
vm-memory=*) vm_memory="${OPTARG#*=}" ;;
|
||||||
vm-image=*) VM_IMAGE="${OPTARG#*=}" ;;
|
vm-image=*) VM_IMAGE="${OPTARG#*=}" ;;
|
||||||
@ -188,9 +188,8 @@ if [[ -n $custom_cpu_cfg ]]; then
|
|||||||
vhost_master_core="${!vhost_master_core}"
|
vhost_master_core="${!vhost_master_core}"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [[ -z $fio_job ]]; then
|
if [[ -z $fio_jobs ]]; then
|
||||||
warning "No FIO job specified! Will use default from common directory."
|
error "No FIO job specified!"
|
||||||
fio_job="$rootdir/test/vhost/common/fio_jobs/default_integrity.job"
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
trap 'error_exit "${FUNCNAME}" "${LINENO}"' INT ERR
|
trap 'error_exit "${FUNCNAME}" "${LINENO}"' INT ERR
|
||||||
@ -397,11 +396,12 @@ for vm_num in $used_vms; do
|
|||||||
done
|
done
|
||||||
|
|
||||||
# Run FIO traffic
|
# Run FIO traffic
|
||||||
fio_job_fname=$(basename $fio_job)
|
for fio_job in ${fio_jobs//,/ }; do
|
||||||
fio_log_fname="${fio_job_fname%%.*}.log"
|
fio_job_fname=$(basename $fio_job)
|
||||||
for i in $(seq 1 $fio_iterations); do
|
fio_log_fname="${fio_job_fname%%.*}.log"
|
||||||
echo "Running FIO iteration $i"
|
for i in $(seq 1 $fio_iterations); do
|
||||||
run_fio $fio_bin --job-file="$fio_job" --out="$VHOST_DIR/fio_results" --json $fio_disks &
|
echo "Running FIO iteration $i for $fio_job_fname"
|
||||||
|
run_fio $fio_bin --hide-results --job-file="$fio_job" --out="$VHOST_DIR/fio_results" --json $fio_disks &
|
||||||
fio_pid=$!
|
fio_pid=$!
|
||||||
|
|
||||||
if $host_sar_enable || $vm_sar_enable; then
|
if $host_sar_enable || $vm_sar_enable; then
|
||||||
@ -435,6 +435,7 @@ for i in $(seq 1 $fio_iterations); do
|
|||||||
wait $fio_pid
|
wait $fio_pid
|
||||||
mv $VHOST_DIR/fio_results/$fio_log_fname $VHOST_DIR/fio_results/$fio_log_fname.$i
|
mv $VHOST_DIR/fio_results/$fio_log_fname $VHOST_DIR/fio_results/$fio_log_fname.$i
|
||||||
sleep 1
|
sleep 1
|
||||||
|
done
|
||||||
done
|
done
|
||||||
|
|
||||||
notice "Shutting down virtual machines..."
|
notice "Shutting down virtual machines..."
|
||||||
|
Loading…
Reference in New Issue
Block a user