hw-test/scripts/test-fio-libaio

37 lines
858 B
Text
Raw Normal View History

2022-07-02 03:25:25 -05:00
#!/bin/bash
2022-07-05 04:14:47 -05:00
IMG_S=6553600 #25GiB
2022-07-02 03:25:25 -05:00
R_T=60
TESTS="randwrite randread randrw"
OBJ_LST="64K 256K 1M 4M "
BS_LST="4K 16K 64K 256K 1M 4M "
DEPTH=32
source scan-netdev
MY_DATE=`date +%Y-%m-%d_%H-%M-%S`
mkdir -p $OUTPUT_DIR/fio
FIO_PRM_CONST="-ioengine=libaio -name=test -runtime=$R_T "
for OBJ in $OBJ_LST ; do
for BS in $BS_LST ; do
# crear imagen de 100G
2022-07-05 04:14:47 -05:00
IMG="image-$MY_HOST"
2022-07-02 03:25:25 -05:00
if [[ ! -f $IMG ]] ; then
echo "dd if=/dev/urandom of=$IMG bs=4k count=$IMG_S status=progress"
dd if=/dev/urandom of=$IMG bs=4k count=$IMG_S status=progress
fi
FIO_PRM="$FIO_PRM_CONST -filename=$IMG "
for TEST in $TESTS ; do
echo
echo "BS: $BS TEST: $TEST DEPTH: $DEPTH"
2022-07-05 03:31:01 -05:00
OUT=$OUTPUT_DIR/fio/fio-$TEST-$OBJ-$BS.out
2022-07-02 03:25:25 -05:00
echo "fio $FIO_PRM --output=$OUT -rw=$TEST -bs=$BS -iodepth=$DEPTH"
fio $FIO_PRM --output=$OUT -rw=$TEST -bs=$BS -iodepth=$DEPTH
done
done
done