Last active
November 21, 2023 11:28
-
-
Save ochronus/8367815 to your computer and use it in GitHub Desktop.
CPU and disk benchmarks
This file contains hidden or 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
# 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 |
This file contains hidden or 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
[random-read] | |
rw=randread | |
size=128m | |
directory=/tmp/fio-testing/data |
This file contains hidden or 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
; 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