Skip to content

Instantly share code, notes, and snippets.

@labdiynez
Forked from mergwyn/zfsbench
Created May 7, 2023 11:15
Show Gist options
  • Select an option

  • Save labdiynez/71e4b5fd9404eb150ef1f2037a6ebd1b to your computer and use it in GitHub Desktop.

Select an option

Save labdiynez/71e4b5fd9404eb150ef1f2037a6ebd1b 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
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment