diff --git a/test/nvme/perf/common.sh b/test/nvme/perf/common.sh index 476c2652a..f06e5141c 100755 --- a/test/nvme/perf/common.sh +++ b/test/nvme/perf/common.sh @@ -260,19 +260,28 @@ function create_fio_config() { # SPDK fio plugin supports submitting/completing I/Os to multiple SSDs from a single thread. # Therefore, the per thread queue depth is set to the desired IODEPTH/device X the number of devices per thread. QD=$IODEPTH - if [[ "$NOIOSCALING" = false ]]; then + if [[ "$NOIOSCALING" == false ]]; then QD=$((IODEPTH * total_disks_per_core)) fi - fio_job_section+=("") - fio_job_section+=("[filename${i}]") - fio_job_section+=("iodepth=$QD") - fio_job_section+=("cpus_allowed=${cores[$i]} #CPU NUMA Node ${cores_numa[$i]}") + if [[ "$FIO_FNAME_STRATEGY" == "group" ]]; then + fio_job_section+=("") + fio_job_section+=("[filename${i}]") + fio_job_section+=("iodepth=$QD") + fio_job_section+=("cpus_allowed=${cores[$i]} #CPU NUMA Node ${cores_numa[$i]}") + fi while [[ "$m" -lt "$total_disks_per_core" ]]; do # Try to add disks to job section if it's NUMA node matches NUMA # for currently selected CPU if [[ "${disks_numa[$n]}" == "$core_numa" ]]; then + if [[ "$FIO_FNAME_STRATEGY" == "split" ]]; then + fio_job_section+=("") + fio_job_section+=("[filename${m}-${cores[$i]}]") + fio_job_section+=("iodepth=$QD") + fio_job_section+=("cpus_allowed=${cores[$i]} #CPU NUMA Node ${cores_numa[$i]}") + fi + if [[ "$plugin" == "spdk-plugin-nvme" ]]; then fio_job_section+=("filename=trtype=PCIe traddr=${disks[$n]//:/.} ns=1 #NVMe NUMA Node ${disks_numa[$n]}") elif [[ "$plugin" == "spdk-plugin-bdev" ]]; then diff --git a/test/nvme/perf/run_perf.sh b/test/nvme/perf/run_perf.sh index 2be85af6a..2bb0a7614 100755 --- a/test/nvme/perf/run_perf.sh +++ b/test/nvme/perf/run_perf.sh @@ -33,6 +33,7 @@ LATENCY_LOG=false IO_BATCH_SUBMIT=0 IO_BATCH_COMPLETE=0 FIO_BIN=$CONFIG_FIO_SOURCE_DIR/fio +FIO_FNAME_STRATEGY="group" TMP_RESULT_FILE=$testdir/result.json PLUGIN="nvme" DISKCFG="" @@ -76,6 +77,8 @@ function usage() { echo " --io-batch-complete=INT Value for iodepth_batch_complete fio option [default=$IO_BATCH_COMPLETE]" echo " --fio-bin=PATH Path to fio binary. [default=$FIO_BIN]" echo " Applicable only for fio-based tests." + echo " --fio-fname-strategy=STR Use 'group' to group filenames under job section with common CPU or" + echo " use 'split' to create a separate fio job section for each filename [default=$FIO_FNAME_STRATEGY]" echo echo "Test setup parameters:" echo " --driver=STR Selects tool used for testing. Choices available:" @@ -130,6 +133,12 @@ while getopts 'h-:' optchar; do io-batch-submit=*) IO_BATCH_SUBMIT="${OPTARG#*=}" ;; io-batch-complete=*) IO_BATCH_COMPLETE="${OPTARG#*=}" ;; fio-bin=*) FIO_BIN="${OPTARG#*=}" ;; + fio-fname-strategy=*) + FIO_FNAME_STRATEGY="${OPTARG#*=}" + if [[ "$FIO_FNAME_STRATEGY" == "split" ]]; then + NOIOSCALING=true + fi + ;; driver=*) PLUGIN="${OPTARG#*=}" ;; disk-config=*) DISKCFG="${OPTARG#*=}"