Skip to content

Instantly share code, notes, and snippets.

@billhathaway
Created July 29, 2014 18:59
Show Gist options
  • Save billhathaway/bd1741c8d6e79408b43d to your computer and use it in GitHub Desktop.
Save billhathaway/bd1741c8d6e79408b43d to your computer and use it in GitHub Desktop.
Using sysbench
# install sysbench with
# sudo yum --enablerepo=epel install -y sysbench
targetDir=/data/benchmark # pick a directory inside your target file system
fileSize=300G # pick large enough size that you aren't using FS cache effectively
threads=128
test=rndrw # can also use rndrd
blockSize=4096
mkdir $targetDir
cd $targetDir
# first time step - build the files it will use
sysbench --num-threads=$threads --test=fileio --file-total-size=$fileSize prepare
# run the actual benchmark
sysbench --test=fileio --file-test-mode=$test --file-extra-flags=direct --file-fsync-freq=0 --file-total-size=$fileSize --max-time=300 --num-threads=$threads
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment