Skip to content

Instantly share code, notes, and snippets.

@Hirozy
Forked from mergwyn/zfsbench
Last active February 9, 2025 06:18
Show Gist options
  • Save Hirozy/028e7c60cfd26f392a7ac6401f1ec580 to your computer and use it in GitHub Desktop.
Save Hirozy/028e7c60cfd26f392a7ac6401f1ec580 to your computer and use it in GitHub Desktop.
ZFS benchmarking using fio
#!/usr/bin/env bash
set -o errexit
printf "#####################\n"
echo $(date):Random 4k read
fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test \
--size=10GB --bs=4k --iodepth=1 --readwrite=randread --sync=1 --runtime=60 && rm test
printf "\n\n#####################\n"
echo \n$(date):Random 4k read
fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test \
--size=10GB --bs=4k --iodepth=1 --readwrite=randwrite --sync=1 --runtime=60 && rm test
printf "\n\n#####################\n"
echo $(date):Sequential write
fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test \
--size=100GB --bs=4m --iodepth=1 --readwrite=write --sync=1 --runtime=60 && rm test
printf "\n\n#####################\n"
echo $(date):Sequential read
fio --randrepeat=1 --direct=1 --gtod_reduce=1 --name=test --filename=test \
--size=100GB --bs=4m --iodepth=1 --readwrite=read --sync=1 --runtime=60 && rm test
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment