0

I am running Ubuntu 18.04 (Bionic) with the HWE stack installed. This means I have the 5.3 Linux kernel running.

In older versions of the kernel, apparently passing elevator=noop when GRUB starts the Linux kernel would result in IO scheduling being a no-op. This is no longer possible via this mechanism once the version 5.3 kernel is installed.

The machine in question is a VM, so it doesn't really make sense to do IO scheduling in the guest.

I can check and adjust the scheduler by changing it directly for the commandline.

$cat /sys/block/vda/queue/scheduler
[mq-deadline] none
$echo none > /sys/block/vda/queue/scheduler
$cat /sys/block/vda/queue/scheduler
[none] mq-deadline 

This switches the VM over to none until it is resarted. There are lots of ways this could be done on startup, but what is the normal way of changing these settings in Ubuntu 18.04 at start time? Is there a way I can apply it to all block devices instead of just one?

1 Answers1

1

I usually put

for SCH in /sys/block/*/queue/scheduler ; do
  echo "none" > "$SCH" 2>/dev/null
done

into /etc/rc.local (and make sure it's executable and owned by root)

Eugen Rieck
  • 20,637