Created
November 23, 2010 20:40
-
-
Save chetan/712484 to your computer and use it in GitHub Desktop.
percona sysbench 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 | |
# script for batch running sysbench I/O tests for mysql workload | |
# http://www.mysqlperformanceblog.com/2009/08/06/ec2ebs-single-and-raid-volumes-io-bencmark/ | |
set -u | |
set -x | |
set -e | |
for size in 256M 16G; do | |
for mode in seqwr seqrd rndrd rndwr rndrw; do | |
sysbench --test=fileio --file-num=1 --file-total-size=$size prepare | |
for threads in 1 4 8 16; do | |
echo PARAMS $size $mode $threads> sysbench-size-$size-mode-$mode-threads-$threads | |
sysbench --test=fileio --file-total-size=$size --file-test-mode=$mode\ | |
--max-time=60 --max-requests=10000000 --num-threads=$threads --init-rng=on\ | |
--file-num=1 --file-extra-flags=direct --file-fsync-freq=0 run \ | |
>> sysbench-size-$size-mode-$mode-threads-$threads 2>&1 | |
done | |
sysbench --test=fileio --file-total-size=$size cleanup | |
done | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment