Skip to content

Instantly share code, notes, and snippets.

@bbhenry
Forked from ochronus/commands.sh
Last active August 29, 2015 13:57
Show Gist options
  • Save bbhenry/9362280 to your computer and use it in GitHub Desktop.
Save bbhenry/9362280 to your computer and use it in GitHub Desktop.
# install sysbench
$ apt-get install sysbench
# CPU benchmark, 1 thread
$ sysbench --test=cpu --cpu-max-prime=20000 run
# CPU benchmark, 64 threads
$ sysbench --test=cpu --cpu-max-prime=20000 --num-threads=64 run
# Disk benchmark, random read. See .fio files in this gist
$ mkdir -p /tmp/fio-testing/data
$ fio random-read.fio
# Disk benchmark, real-world use case
$ fio server.fio
[random-read]
rw=randread
size=128m
directory=/tmp/fio-testing/data
; Four threads, two query, two writers.
[global]
rw=randread
size=256m
directory=/tmp/fio-testing/data
ioengine=libaio
iodepth=4
invalidate=1
direct=1
[bgwriter]
rw=randwrite
iodepth=32
[queryA]
iodepth=1
ioengine=mmap
direct=0
thinktime=3
[queryB]
iodepth=1
ioengine=mmap
direct=0
thinktime=5
[bgupdater]
rw=randrw
iodepth=16
thinktime=40
size=32m
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment