Last active
January 23, 2018 17:32
-
-
Save mdcallag/ea81a1df002bce41d54c308db9e9957e to your computer and use it in GitHub Desktop.
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
--- script to run tests from sysbench fileio rndrd, rndrw, rndwr | |
--- rndrd is read-only, rndrw is read-write, rndwr is write-only | |
--- I have been using loops=5, secs=180, numfiles=1, prepare="yes" | |
sysbench=$1 | |
loops=$2 | |
secs=$3 | |
numfiles=$4 | |
prepare=$5 | |
if [[ $prepare == "yes" ]]; then | |
rm -f test_file.* | |
$sysbench fileio --file-num=$numfiles --file-test-mode=rndrd --file-extra-flags=direct --max-requests=0 --num-threads=1 prepare | |
sync | |
sleep 70 | |
fi | |
for y in rd rw wr ; do | |
for t in 1 4; do | |
for i in $( seq 1 $loops ); do | |
$sysbench fileio --file-num=$numfiles --file-test-mode=rnd${y} --file-extra-flags=direct --max-requests=0 --num-threads=$t --max-time=$secs run > o.${y}.$i.${t}t | |
done | |
done | |
done | |
--- script to get results of last loop | |
loops=$1 | |
for y in rd rw wr ; do | |
echo test $y | |
for t in 1 4; do | |
echo threads $t | |
for i in $( seq 1 $loops ); do | |
grep MiB o.${y}.$i.${t}t | awk '{ s += $3; c += 1 } END { printf "%.0f\t", s }' | |
done | |
echo | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment