Automated test scripts
YABS
https://github.com/masonr/yet-another-bench-script
On x64 hosts, --numjobs=2 --size=2G
.
curl -LO https://raw.githubusercontent.com/l2dy/yet-another-bench-script/0958b7fcf382a2e3ddfb23a26df3cb05067f1367/yabs.sh
chmod +x yabs.sh
sudo apt install fio iperf3
./yabs.sh -g
fio
Basic examples
[random-writers]
size=64m
# 1 job per available CPU thread
numjobs=4
The result is 4 processes each randomly writing to their own 64MiB file.
PostgreSQL performance test
[read-write]
rw=rw
rwmixread=75
# 18g for more space or less CPU thread
size=13g
directory=/home
fadvise_hint=0
blocksize=8k
direct=0
# 1 job per available CPU thread
numjobs=112
nrfiles=1
runtime=1h
time_based
exec_prerun=echo 3 > /proc/sys/vm/drop_caches
IOPS performance test
# Test disk random read
sudo fio --filename=<device name> --direct=1 --rw=randread --bs=4k --ioengine=libaio --iodepth=256 --runtime=120 --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1 --readonly
# Test file random read/writes, 2T
sudo fio --filename=/<custom mount point>/file --size=500GB --direct=1 --rw=randrw --bs=4k --ioengine=libaio --iodepth=256 --runtime=120 --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1
# Test disk random read/writes (dangerous)
sudo fio --filename=<device name> --direct=1 --rw=randrw --bs=4k --ioengine=libaio --iodepth=256 --runtime=120 --numjobs=4 --time_based --group_reporting --name=iops-test-job --eta-newline=1