Skip to content

Instantly share code, notes, and snippets.

@reddikih
Last active Dec 4, 2017
Embed
What would you like to do?
fio check script
#!/bin/sh
NAME=
IODEPTH="1 4 8 16 32 64 128 256"
RUNTIME=60
FILENAME_RANDREAD="/dev/sdb"
FILENAME_RANDRW="/mnt/resource/dummy"
FILENAME_SEQWRITE="/mnt/resource/dummy_write"
NAME="randread"
for filename in $FILENAME_RANDREAD
do
for depth in $IODEPTH
do
sudo sh -c 'sync;sync;sync;echo 3 > /proc/sys/vm/drop_caches; sync;sync;sync;'
sudo fio --name=$NAME --ioengine=libaio --direct=1 --buffered=0 --numjobs=1 --iodepth=$depth --rw=$NAME --bs=4096 --size=100% --filename=$filename --ramp_time=10 --runtime=$RUNTIME > fio-$NAME-$depth-$(basename $filename)
done
done
NAME="randrw"
for filename in $FILENAME_RANDRW
do
for depth in $IODEPTH
do
sudo sh -c 'sync;sync;sync;echo 3 > /proc/sys/vm/drop_caches; sync;sync;sync;'
sudo fio --name=$NAME --ioengine=libaio --direct=1 --buffered=0 --numjobs=1 --iodepth=$depth --rw=$NAME --bs=4096 --size=10g --filename=$filename --ramp_time=10 --runtime=$RUNTIME > fio-$NAME-$depth-$(basename $filename)
done
done
NAME="write"
depth=1
filename=$FILENAME_SEQWRITE
sudo sh -c 'sync;sync;sync;echo 3 > /proc/sys/vm/drop_caches; sync;sync;sync;'
sudo fio --name=$NAME --ioengine=libaio --direct=1 --buffered=0 --numjobs=1 --iodepth=$depth --rw=$NAME --bs=4096 --size=10g --filename=$filename --ramp_time=10 --runtime=$RUNTIME > fio-$NAME-$depth-$(basename $filename)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment