fio "${args[@]}" "$@"
}
+# Wrapper around _run_fio used if you need some I/O but don't really care much
+# about the details
+_run_fio_rand_io() {
+ _run_fio --bs=4k --rw=randread --norandommap --numjobs="$(nproc)" \
+ --name=reads --direct=1 "$@"
+}
+
_fio_perf_report() {
# If there is more than one group, we don't know what to report.
if [[ $(wc -l < "$TMPDIR/fio_perf") -gt 1 ]]; then
fi
# start fio job
- _run_fio --bs=4k --rw=randread --norandommap \
- --name=reads --filename="$TEST_DEV" --size="$size" \
- --numjobs=8 --direct=1 &
+ _run_fio_rand_io --filename="$TEST_DEV" --size="$size" &
# while job is running, switch between schedulers
while kill -0 $! 2>/dev/null; do
--filename=/dev/nullb0 --size=5g --direct=1
# run async test
- _fio_perf --bs=4k --ioengine=libaio --iodepth=8 --numjobs=4 \
+ _fio_perf --bs=4k --ioengine=libaio --iodepth=8 --numjobs="$(nproc)" \
--rw=randread --norandommap --name=async \
--filename=/dev/nullb0 --size=5g --direct=1
fi
# start fio job
- _run_fio --bs=4k --rw=randread --norandommap \
- --name=reads --filename="$TEST_DEV" --size="$size" \
- --numjobs=8 --direct=1 &
+ _run_fio_rand_io --filename="$TEST_DEV" --size="$size" &
# while job is running, hotplug CPUs randomly
while kill -0 $! 2>/dev/null; do
fi
# start fio job
- _run_fio --bs=4k --rw=randread --norandommap \
- --name=reads --filename="$TEST_DEV" --size="$size" \
- --numjobs=8 --direct=1 --ignore_error=EIO,ENXIO,ENODEV &
+ _run_fio_rand_io --filename="$TEST_DEV" --size="$size" \
+ --ignore_error=EIO,ENXIO,ENODEV &
while kill -0 $! 2>/dev/null; do
echo 0 > "/sys/bus/pci/devices/${pdev}/enable"