noop, deadline or cfq scheduler for HDD and SDD with ZFS?

mailinglists

Renowned Member
Mar 14, 2012
641
67
93
Hi guys,

which scheduler do you use for your SSD and HDD drives, when they are used for ZFS?

I use noop, as that it what PM sets by default on my ZFS initiated disks.
But recent thread and quick google search made me think, I might be better off setting deadline for HDDs.

I might do some testing in the future when I have the time, and update this thread.
 
Here is what i found out by talking to people in #zfs on freenet.

1. noop is recommended if ZFS has the disk all to itself, deadline otherwise
2. CFQ sucks. don't use it.
3. also note that if ZFS has the disk all to itself, it should be setting noop automatically
4. for SSDs in general I would just go with noop. any good SSD can handle it, even with multiple partitions and partition types

I noticed that PM did not set noop on HDD disks when added to raid 10 pool:
Code:
 zpool create -f -o ashift=12  vmpool mirror /dev/sdc /dev/sdd mirror /dev/sde /dev/sdf

  pool: vmpool
 state: ONLINE
  scan: none requested
config:

   NAME        STATE     READ WRITE CKSUM
   vmpool      ONLINE       0     0     0
     mirror-0  ONLINE       0     0     0
       sdc     ONLINE       0     0     0
       sdd     ONLINE       0     0     0
     mirror-1  ONLINE       0     0     0
       sde     ONLINE       0     0     0
       sdf     ONLINE       0     0     0

root@moor2:/vmpool# cat /sys/block/sd*/queue/scheduler
[noop] deadline cfq
[noop] deadline cfq
noop [deadline] cfq
noop [deadline] cfq
noop [deadline] cfq
noop [deadline] cfq

For SSDs, it did.
 
1. noop is recommended if ZFS has the disk all to itself, deadline otherwise



The schedule queue is per disk, and not per partions. So is not possible the the OS to use dedline and zfs to use noop.
But this is not so important. Noop is useful if you have many VM (zvol). Because in VM is possible to have a different disk queue, so the best for zfs is to use no disk queue(noop). The same ideaa is for ssd (noop, because the ssd has own disk queue), or for lvm.
Deadline is ok in most of the case for HDD. Why? Because it have 2 separate queue one for write (40% from total disk queue), and one for write (60%). In this case if you have a long write operation, your reads are ok.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!