#!/bin/sh

ZFS_POOL="rpool/fio"
zfs destroy ${ZFS_POOL}

for BLOCKSIZE in 4k 8k 32k 128k; do
	zfs destroy ${ZFS_POOL}
	zfs create -V 64G -b $BLOCKSIZE -o compression=off ${ZFS_POOL}
	for IODEPTH in 1 4 16; do
		IODEPTH=${IODEPTH} BLOCKSIZE=${BLOCKSIZE} ZFS_POOL=${ZFS_POOL} fio bench-zfs.fio --output=nvme-zfs-${BLOCKSIZE}-IOD${IODEPTH}.txt
	done
done

zfs destroy ${ZFS_POOL}
