FAQ - What is the purpose of setting the disk scheduler?
Aerospike database allows for persistent storage through the use of HDD or SSD drives. I/O schedulers can improve performance of slower storage devices with limited queueing. I/O schedulers can reorder and prioritize disk I/O requests. Particularly useful in HDD drives that are mechanical and use a lot of seeking to read and write data.
PCIe devices (Nvme ssd drives) have their own large internal queues along with fast service and do not require or benefit from setting an I/O scheduler.
In versions of aerospike prior to 3.10.1 the following error would be generated in the logs for nvme devices:
Sep 23 2016 14:08:55 GMT: WARNING (drv_ssd): (drv_ssd.c:3478) storage: couldn't open /sys/block/nvme0n/queue/scheduler, did not set scheduler mode: No such file or directory Sep 23 2016 14:08:55 GMT: WARNING (drv_ssd): (drv_ssd.c:3478) storage: couldn't open /sys/block/nvme1n/queue/scheduler, did not set scheduler mode: No such file or directory
This error was benign and could have been ignored. Aerospike tried to set scheduler on an NVME drive that does not support a scheduler and is by default set to none.
Different type of schedulers
There exist 4 types of disk I/O scheduler’s that can be set for disk devices.
A disk device IO scheduler could be configured to one of the following values:
noop : Recommended when using aerospike with non-nvme drives, ssd or hdd. The noop scheduler does not perform any I/O requests sorting and only does merging of I/O requests.
none : As the name implies, no use of a scheduler by the device. This is recommended for NVME drives.
deadline : The deadline I/O Scheduler is a lightweight scheduler which enforces a soft deadline on I/O requests.
cfq : The Complete Fair Queuing (CFQ) I/O Scheduler tries to maintain system-wide fairness of I/O bandwidth
Scheduler noop nvme