10

I have some virtual machines running Ubuntu cloud-based image 14.04-1 LTS version. I wanted to see the IO performance of different IO schedulers on the VM so I went to /sys/block/<drive>/queue/scheduler on the guest OS to change the IO scheduler. Usually, there should be cfq, deadline, or noop to choose. But what I saw is none. Does it mean that Canonical has removed the I/O scheduler in the cloud-based image or the scheduler none here is the renamed noop scheduler? and what happens if we don't have an I/O scheduler in the system? All the io requests were directly sent the host in FIFO order?

Thanks for shed some light!

Ha Son Hai
  • 195
  • 2
  • 2
  • 9
  • 1
    Is your server running under KVM hypervisor? – mvillar May 20 '15 at 15:50
  • In most cases, none or noop as a scheduler is best in VMs, as scheduling is already accomplished at least one layer below, at the hypervisor's kernel level. – Spooler Sep 27 '16 at 16:07

5 Answers5

16

It seems that on kernels >= 3.13 none is not an alias of noop anymore. It is shown when the blk-mq I/O framework is in use; this means a complete bypass of the old schedulers, as blk-mq has (right now) no schedulers at all to select.

On earlier kernels, none really is a poorly-documented alias for noop. See here for more details.

shodanshok
  • 44,038
  • 6
  • 98
  • 162
  • See [another answer for the same question here](http://stackoverflow.com/a/36796882/142239). – Siu Ching Pong -Asuka Kenji- Nov 20 '16 at 16:30
  • 1
    It seems that on kernels > 3.13 `none` is shown when the `blk-mq` I/O framework is in use. So yes, with such kernels, `none` means a complete bypass of the old schedulers, as `blk-mq` has no schedulers at all to select. I've updated my answer. – shodanshok Nov 20 '16 at 22:04
5

From this Debian Wiki:

Low-Latency IO-Scheduler

(This step is not necessary for SSDs using the NVMe protocol instead of SATA, which bypass the traditional I/O scheduler and use the blk-mq module instead.)

The default I/O scheduler queues data to minimize seeks on HDDs, which is not necessary for SSDs. Thus, use the "deadline" scheduler that just ensures bulk transactions won't slow down small transactions: Install sysfsutils and

echo "block/sdX/queue/scheduler = deadline" >> /etc/sysfs.conf

(adjust sdX to match your SSD) reboot or

echo deadline > /sys/block/sdX/queue/scheduler

So, the answer is: none is NOT an alias for noop. none means "the scheduler is not used".

  • 2
    I'm not sure how the quote brings you to your conclusion that `noop` is not `none`. Could you elaborate? – John K. N. Nov 21 '16 at 08:08
  • 4
    As I know, `noop` still makes a few scheduling decisions (like requests merging), while `None` means none at all. – Ha Son Hai Mar 20 '17 at 13:22
3

None is not an alias for noop.

None is displayed because no scheduler is in use. SSDs using the NVMe protocol instead of SATA bypass the traditional I/O scheduler.

Dan Quirk
  • 41
  • 2
2

Guest VMs have virtual I/O devices provided by the hypervisor. Therefore the actual I/O device scheduling is performed by the hypervisor kernel, and guests pass all device I/O directly to hypervisor without any scheduling.

Tero Kilkanen
  • 34,499
  • 3
  • 38
  • 58
  • Please add something like "assuming the VM has an optimal configuration" and maybe give a tip about how to find that configuration. – daveloyall Jan 02 '20 at 17:19
1

https://wiki.ubuntu.com/Kernel/Reference/IOSchedulers

none (Multiqueue) The multi-queue no-op I/O scheduler. Does no reordering of requests, minimal overhead. Ideal for fast random I/O devices such as NVME.

Marcin
  • 11
  • 1