Archive

Archive for August, 2017

BFQ IO Scheduler on Artful Aardvark.

August 23, 2017 Leave a comment

BFQ is a new IO scheduler in the 4.12 kernels, but it’s not enabled by default.

If you’re running a 4.12 kernel (say you’ve run ‘do-release-upgrade –devel-release’ to get to Ubuntu Artful Aardvark), it’s simply a matter of adding these lines to the config files :

$ grep use_blk_mq /etc/default/grub
GRUB_CMDLINE_LINUX="scsi_mod.use_blk_mq=1"
$ grep bfq /etc/modules-load.d/modules.conf
bfq
$ cat /etc/udev/rules.d/60-IO-scheduler.rules
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/scheduler}="bfq"
ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/iosched/low_latency}="0"

You’ll note I’ve disabled low_latency mode here, as I’m using BFQ on a server I do not need to be┬áreducing the latency for interactive and soft real-time processes, and there are some throughput benefits to disabling low_latency.

To enable bfq for imported ZFS pool vdevs, you’ll need to add this line and reboot :

 $ sudo tee -a /etc/modprobe.d/zfs.conf
options zfs zfs_vdev_scheduler=bfq
Advertisements