Skip to content

Instantly share code, notes, and snippets.

@mergwyn
Last active June 7, 2024 07:39
Show Gist options
  • Save mergwyn/7be8dde50e21ed0e72a6e74a911a8dce to your computer and use it in GitHub Desktop.
Save mergwyn/7be8dde50e21ed0e72a6e74a911a8dce to your computer and use it in GitHub Desktop.
ZFS benchmarking using fio
#!/usr/bin/env bash
set -o errexit
echo $(date):Random read
fio --filename=test --sync=1 --rw=randread --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
echo $(date):Random write
fio --filename=test --sync=1 --rw=randwrite --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
echo $(date):Sequential read
fio --filename=test --sync=1 --rw=read --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
echo $(date):Sequential write
fio --filename=test --sync=1 --rw=write --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=10G --runtime=300 && rm test
@dalisoft
Copy link

Using on TrueNAS Shell via curl https://gist.githubusercontent.com/mergwyn/7be8dde50e21ed0e72a6e74a911a8dce/raw/78dfc33e31de5d5c46201df690cae7904153f749/zfsbench | bash -

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment