Benchmarking Disk Performance

bonnie | bonnie-plot | bonnie-steroids | lab/fsbench

Warning

we are using the good old v1 here

v1: https://www.coker.com.au/bonnie++/

v2: https://doc.coker.com.au/projects/bonnie/

Requirements

debian

apt update
apt install bonnie++

slackware

slackpkg search e2fsprogs
slackpkg search xfsprogs
slackpkg search btrfs-progs
sbopkg -s reiser4progs
slackpkg search f2fs-tools

Ready to go

no need for a dedicated user nor to disable caching yet

#useradd -m bonnie -s /sbin/nologin
#sysctl -w vm.drop_caches=3
sysctl vm.drop_caches # should be 0

lvcreate --virtualsize=5G --thin -n bonnie thin/pool

blkdiscard /dev/thin/bonnie -f
mkfs.ext4 /dev/thin/bonnie
fs=ext4

blkdiscard /dev/thin/bonnie -f
mkfs.xfs /dev/thin/bonnie -f
fs=xfs

blkdiscard /dev/thin/bonnie -f
mkfs.btrfs -O list-all
mkfs.btrfs -R list-all
...

blkdiscard /dev/thin/bonnie -f
mkfs.reiser4 --print-plugins
mkfs.reiser4 --print-profile
...

mp=/var/tmp/bonnie
mkdir -p $mp/
touch $mp/NOT_MOUNTED

mount MOUNT-OPTIONS-HERE /dev/thin/bonnie $mp/

catching only stdout does the job already

# RAM 1G
bonnie++ -u root -x 5 -r 1024 -m $fs -d $mp/ | grep -v ^name, | tee -a /var/tmp/bonnie-$fs

# FILES 4G instead of 2G
# -s 4096

get ready for the next round

#rm -f $mp/Bonnie.*
umount $mp/

and eventually repeat the test against other file-systems and options

finally deliver the stats to some web server

for f in *.bon; do
    bon_csv2txt < $f > ${f%\.bon}.txt
    bon_csv2html < $f > ${f%\.bon}.html
done; unset fs

and when finished entirely

lvremove thin/bonnie

see on steroids for more tests and see Plotting Bonnie for cute and 3 dimentional graphs

Resources

Bonnie++ 1.03e https://www.coker.com.au/bonnie++/

Bonnie introduction https://www.textuality.com/bonnie/advice.html

Benchmark disk IO with DD and Bonnie++ https://www.jamescoyle.net/how-to/599-benchmark-disk-io-with-dd-and-bonnie

Simple Bonnie++ Example https://www.jamescoyle.net/how-to/913-simple-bonnie-example

Decoding Bonnie++ https://blogs.oracle.com/roch/decoding-bonnie

Using Bonnie++ for filesystem performance benchmarking https://www.linux.com/news/using-bonnie-filesystem-performance-benchmarking/

Active Benchmarking: Bonnie++ http://www.brendangregg.com/ActiveBenchmarking/bonnie++.html

Redirect only the last line of STDOUT to a file https://stackoverflow.com/questions/4821731/redirect-only-the-last-line-of-stdout-to-a-file

Disk Speed Test (Read/Write): HDD, SSD Performance in Linux https://www.shellhacks.com/disk-speed-test-read-write-hdd-ssd-perfomance-linux/

Linux server performance: Is disk I/O slowing your application? https://haydenjames.io/linux-server-performance-disk-io-slowing-application/

https://www.textuality.com/bonnie/advice.html

http://sisco.laf.free.fr/codes/bonnie-raid-hp.html

http://www.brendangregg.com/ActiveBenchmarking/bonnie++.html

https://gist.githubusercontent.com/npinto/1182653/raw/a0dfad6a811f1cbbe69da24dddce56c4a04c66a4/plot_bonnie.sh

https://etbe.coker.com.au/category/benchmark/

https://etbe.coker.com.au/2012/01/05/drbd-benchmarking/

guides

https://blogs.oracle.com/solaris/post/decoding-bonnie

https://community.splunk.com/t5/Splunk-Search/How-do-I-interpret-these-Bonnie-results/m-p/207894

https://www.linux.com/news/using-bonnie-filesystem-performance-benchmarking/

xfs

https://www.linuxquestions.org/questions/linux-general-1/tune2fs-equivalent-for-an-xfs-file-system-848214/ –> xfs_info


HOME | GUIDES | LECTURES | LAB | SMTP HEALTH | HTML5 | CONTACT
Copyright © 2024 Pierre-Philipp Braun