====== IO scheduler ====== If whole device is managed by ZFS (not partition), ZFS sets scheduler to ''none''. ===== official recommendation ===== For rotational devices, there is no sense to use advanced schedulers ''cfq'' or ''bfq'' directly on hard disc. Both depends on processes, processes groups and application. In this case there is group of kernel processess for ZFS. Only possible scheduler to consider is ''deadline'' / ''mq-deadline''. ''Deadline'' scheduler group reads into batches and writed into separate batches ordering by increasing LBA address (so it should be good for HDDs). There is a discussion on OpenZFS project to do not touch schedulers anymore and let it to be configured by admin: * [[https://github.com/openzfs/zfs/pull/9042|Set "none" scheduler if available (initramfs) #9042]] * [[https://github.com/openzfs/zfs/commit/42c24d90d112b6e9e1a304346a1335e058f1678b|https://github.com/openzfs/zfs/commit/42c24d90d112b6e9e1a304346a1335e058f1678b]] ===== my findings ===== There is huge benefit to use ''bfq'' on rotational HDD. No more huge lags during KVM backups. ''bfq'' honor ''ionice'' and: * kernel ''zvol'' processes have prio ''be/0'' * kvm processes have prio ''be/4'' * kvm process during vzdump have ''be/7'' - NOTE: only with patched version of kvm: ''pve-qemu-kvm''>= ''8.1.5-6''.