Last active
December 4, 2017 07:02
-
-
Save reddikih/427886abe0af1990d0d9d0f0810a6b80 to your computer and use it in GitHub Desktop.
fio check script
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/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