36 lines
858 B
Bash
Executable file
36 lines
858 B
Bash
Executable file
#!/bin/bash
|
|
|
|
IMG_S=6553600 #25GiB
|
|
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
|
|
IMG="image-$MY_HOST"
|
|
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"
|
|
OUT=$OUTPUT_DIR/fio/fio-$TEST-$OBJ-$BS.out
|
|
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
|
|
|
|
|