Disk Performance Testing
- http://woshub.com/check-disk-performance-iops-latency-linux/
- https://we.riseup.net/riseup+tech/disk-testing-procedure
Physical Link
~/bin/ata_link_speed.sh
piBenchmark
Start test:
curl https://raw.githubusercontent.com/TheRemote/PiBenchmarks/master/Storage.sh | sudo bash
IOping
sudo apt install ioping
ioping -c 20 /tmp/
Comparism:
- sancho (SSD):
min/avg/max/mdev = 74.0 us / 5.48 ms / 6.97 ms / 2.76 ms
- bitrigger:
min/avg/max/mdev = 395.7 us / 7.30 ms / 10.8 ms / 2.79 ms
- varac-test (cosmos VPS, amsterdam):
min/avg/max/mdev = 293.2 us / 471.7 us / 1.40 ms / 271.5 us
- stackspin-test (eclips.is Miami):
min/avg/max/mdev = 507.9 us / 26.3 ms / 256.0 ms / 74.1 ms
FIO
- http://woshub.com/check-disk-performance-iops-latency-linux/
- Better than Bonnie which is single-threaded
- Comparism data in
~/projects/hardware/hardwaretests/fio/
Random Read/Write Operation Test:
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 \
--bs=4k --iodepth=64 --size=8G --readwrite=randrw --rwmixread=75 \
--name=$(hostname) --filename=/tmp/fiotest \
--output=/tmp/fio-$(hostname)-$(date +%Y-%m-%d-%H:%M:%S).log
FIO results compared
host/VPS (sorted by WRITE results) | READ (MiB/s) | WRITE (MiB/s) | Read Factor (baseline=varac-test) | Write factor (baseline=varac-test) |
---|---|---|---|---|
stackspin-test (miami) | 1.7 | 0.56 | 3.26% | |
varac Raspberry Pi4, cheap class 10 sdcard | 2.02 | 0.67 | 3.85% | |
varac VPS at another provider (xen) | 2.35 | 0.78 | 4.48% | |
AWS ec2 m5.large, EBS storage | 8.8 | 2.94 | 16.92% | |
varac-test (cosmos VPS in amsterdam) | 52.2 | 17.4 | 100% | |
varac's 2. personal cluster (ganeti/kvm) | 95.3 | 31.8 | 182% | |
varac's personal cluster (ganeti/kvm) | 180 | 60.1 | 345% | |
varac's laptop (ssd) | 519 | 173 | 994% |
Bonnie++
From https://linuxreviews.org/HOWTO_Test_Disk_I/O_Performance#bonnie.2B.2B:
However, it does have some flaws: It is single-threaded which means that some operations will appear to be slower than they actually are on any multi-core machine.
see ~/dev/admin/hardwaretests/bonnie
and ~/bin/bonnie-to-graph.sh
- Takes about 5 mins for an decent SSD (sancho)
- Comparism data in
~/projects/hardware/hardwaretests/bonnie/
Shut down cpu/io hungry procs (libvirt, thunderbird, etc)
sudo -i
apt-get install bonnie++
mkdir ${HOME}/tmp
mem_kb=$(grep MemTotal /proc/meminfo |grep -o '[0-9]*')
doublemem_mb=$(( 2*mem_kb/1024 ))
time bonnie -u 0:0 -s ${doublemem_mb} -d ${HOME}/tmp > /tmp/bonnie.$(hostname -f).$(date +%Y-%m-%d-%H:%M:%S).log
Find out RAM size in Freebsd:
grep memory /var/log/dmesg.today
IOZone
nur in debian non-free :(
iozone -t1 -i0 -i1 -i2 -r1m -s32g -F /var/lib/libvirt/images/iozone.test
hdparm + dd
https://linuxconfig.org/how-to-benchmark-disk-performance-on-linux https://github.com/geerlingguy/raspberry-pi-dramble/issues/7
read spead (hdparm only works with physical links):
sudo hdparm -tv /dev/mmcblk0
write speed:
sudo sh -c "echo 3 > /proc/sys/vm/drop_caches"
sudo time dd if=/dev/zero of=/dev/mmcblk999 oflag=direct bs=1M count=1K
hdparm buff. cached R | dd W | |
---|---|---|
NVME WD Blue SN550 (dapple nitrokey) | 1691.18 MB/sec | 548 MB/s |
WDC WD40EFAX-68JH4N1 4TB SATA 3,5" | 134 MB/sec | 131 MB/s |
throttled to 1,5Gbit/s link | ||
===== SD Cardss: ===== | ||
MicroSD SanDisk Ultra Cl. 10 A1 32GB | 76.65 MB/sec | 24.4 MB/s |
" | 77.64 MB/sec | 24.6 MB/s |
MicroSD SanDisk Ultra Cl. 10 8GB | 42.49 MB/sec | 12.8 MB/s |
MicroSD Noname Cl. 4 4GB | 21.35 MB/sec | 5.9 MB/s |
MicroSD Noname CL. 10 8GB | 51.05 MB/sec | 14.9 MB/s |
Verbatim Cl. 10 16GB | 42.20 MB/s | 2.2 MB/s (!!!) |