Skip to content

Instantly share code, notes, and snippets.

@chetan
Created November 23, 2010 20:40
Show Gist options
  • Save chetan/712484 to your computer and use it in GitHub Desktop.
Save chetan/712484 to your computer and use it in GitHub Desktop.
percona sysbench script
#!/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