4

I'm trying to select the new mq-deadline io scheduler but it doesn't seem available.

$ cat /sys/block/sda/queue/scheduler 
noop [deadline] 

kernel:

$ uname -a
Linux pluto 4.11.6-zenbook #1 SMP Wed Jun 21 09:39:34 EDT 2017 x86_64 GNU/Linux

dmesg:

$ sudo dmesg|grep deadline
[    0.077863] TSC deadline timer enabled
[    1.383260] io scheduler deadline registered (default)
[    1.383261] io scheduler mq-deadline registered
3

You also need to enable CONFIG_SCSI_MQ_DEFAULT

Symbol: SCSI_MQ_DEFAULT [=y]
Type  : boolean
Prompt: SCSI: use blk-mq I/O path by default
  Location:
    -> Device Drivers
      -> SCSI device support
  Defined at drivers/scsi/Kconfig:50
  Depends on: SCSI [=y]

And voila

$ cat /sys/block/sda/queue/scheduler
[mq-deadline] none
1

You only need to specify theses parameters on the kernel command line :

scsi_mod.use_blk_mq=1 elevator=mq-deadline

Source : https://wiki.archlinux.org/index.php/improving_performance#Changing_I.2FO_scheduler

  • This is partly correct. Currently (up to kernel 5.0.0) it is not possible to change the scheduler when using blk-mq using a boot parameter, so elevator=mq-deadline will have no effect. Note that in that particular case it might look like it is working, on my box mq-deadline is the one picked up by default eventhough I have BFQ and None compiled in kernel. – Huygens Mar 7 '19 at 12:43

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.