Read and write bandwidth limits in ZFS

Especially in environments with loads competing for the same resources (like using disk space on the same array) it can be useful to limit the ability of an application to flood the infrastructure. With Solaris 11.4 ZFS got the ability to configure bandwidth limits for read and write.

root@batou:/testpool# zfs set writelimit=100m testpool/limited
root@batou:/testpool# time mkfile 1g /testpool/limited/testfile

real    0m9,242s
user    0m0,014s
sys     0m0,272s


Just to check if it’s not just my notebook limiting it, i’m now doubling the allocated bandwidth.

root@batou:/testpool# zfs set writelimit=200m testpool/limited
root@batou:/testpool# time mkfile 1g /testpool/limited/testfile

real    0m4,126s
user    0m0,009s
sys     0m0,201s


It’s not exactly limited to the bandwidth but close enough. To set the limit for reads you have to use zfs set readlimit=100m testpool/limited