• How to enable BFQ I/O scheduler with kernel 4.12?

    My Antergos always use cfq…
    I installed linux-zen from Arch repo…
    I edited /etc/udev/rules.d/60-schedulers.rules file…
    I added scsi_mod.use_blk_mq=1 parameter to grub config file…

    Nothing worked. Can anyone help me please? Thanks.

  • See here.


    Edit: So, I tested on my system. Here is my 60-schedulers.rules file:

    # set deadline scheduler for non-rotating disks
    ACTION=="add|change", KERNEL=="sd[a-z]", TEST!="queue/rotational", ATTR{queue/scheduler}="deadline"
    ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="0", ATTR{queue/scheduler}="bfq"
    # set cfq scheduler for rotating disks
    ACTION=="add|change", KERNEL=="sd[a-z]", ATTR{queue/rotational}=="1", ATTR{queue/scheduler}="cfq"

    This works for me. You installed linux-zen but are you sure you are using it? If I boot into default kernel scheduler drops to cfq.

  • yes, uname -r says

    My system is still using cfq
    cat /sys/block/sd*/queue/scheduler says

    noop deadline [cfq]

  • @Strangiato this is interesting because you dont even have an option to choose bfq. This option should come default by linux-zen as far as I know. I didnt need some extra configuration or packages to have bfq.

    There are couple of things you can try:

    • remove and reinstall linux-zen
    • maybe you need kernel headers so install linux-zen-headers
    • if none of these works you can try linux-ck

    You can post this in arch forums as well since linux-zen is from official repo. Dont tell them you are using Antergos.

  • Same thing after install the linux-zen kernel headers. 😠

  • Assuming you modified /etc/default/grub, did you regenerate grub.cfg with:

    # grub-mkconfig -o /boot/grub/grub.cfg

    and reboot?

  • @triode13 Yes, I rebooted my machine.

    But it’s solved now!

    Edit /etc/udev/rules.d/60-schedulers.rules file
    Comment the line ACTION==“add|change”, KERNEL==“sd[a-z]”, TEST!=“queue/rotational”, ATTR{queue/scheduler}="deadline"

    Edit the line about rotate disks (I use only HDs) changing to bfq in the end of line:
    ACTION==“add|change”, KERNEL==“sd[a-z]”, ATTR{queue/rotational}==“1”, ATTR{queue/scheduler}="bfq"

    Create the file /etc/systemd/system/[email protected]
    Add the content below into the file

    Description=Set BFQ for %i
    ExecStart=-/usr/bin/bash -c 'echo bfq >/sys/block/%i/queue/scheduler'

    Edit /etc/default/grub file and add
    scsi_mod.use_blk_mq=1 parameter to GRUB_CMDLINE_LINUX_DEFAULT line

    Run grub-mkconfig -o /boot/grub/grub.cfg and reboot

    Now cat /sys/block/sd*/queue/scheduler output is
    mq-deadline kyber [bfq] none
    mq-deadline kyber [bfq] none
    mq-deadline kyber [bfq] none

    It worked only with kernel linux-zen.

Posts 7Views 3957
Bloom Email Optin Plugin

Looks like your connection to Antergos Community Forum was lost, please wait while we try to reconnect.