Skip to content

Instantly share code, notes, and snippets.

@xaibex
Forked from mergwyn/zfsbench
Last active December 23, 2023 21:15
Show Gist options
  • Save xaibex/e653608dd1d14c60ad02542406fddb17 to your computer and use it in GitHub Desktop.
Save xaibex/e653608dd1d14c60ad02542406fddb17 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 --rw=randread --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=1G --runtime=300 && rm test
echo -----------------------------------------------------------------------------------------
echo $(date):Random write
fio --filename=test --rw=randwrite --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=1G --runtime=300 && rm test
echo -----------------------------------------------------------------------------------------
echo $(date):Sequential read
fio --filename=test --rw=read --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=1G --runtime=300 && rm test
echo -----------------------------------------------------------------------------------------
echo $(date):Sequential write
fio --filename=test --rw=write --bs=4k --numjobs=1 \
--iodepth=4 --group_reporting --name=test --filesize=1G --runtime=300 && rm test
@xaibex
Copy link
Author

xaibex commented Dec 23, 2023

Usage on TrueNAS Shell via

curl -s -L https://gist.github.com/xaibex/e653608dd1d14c60ad02542406fddb17/raw/c3927d610088cedf43d97adb53dbe7b29c8e7b95/zfsbench | bash

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