apt install fio
fio --randrepeat=1 --ioengine=libaio --direct=1 --gtod_reduce=1 --name=test --bs=4k --iodepth=64 --readwrite=randrw --rwmixread=75 --size=4G --filename=/tmp/testfile
(via https://docs.gitlab.com/ee/administration/operations/filesystem_benchmarking.html)