What is the default I/O scheduler in RHEL8?
Environment
- Red Hat Enterprise Linux 8
Issue
- Need to know the default I/O scheduler in RHEL 8
Resolution
-
Available I/O schedulers in RHEL8 are
mq-deadline,kyber,bfq, andnone.# cat /sys/block/sda/queue/scheduler [mq-deadline] kyber bfq none -
No specific I/O scheduler is assigned in RHEL8. Instead, the scheduler is chosen on a by-device basis depending on its type.
- The scheduler can be set using How to persistently set the I/O scheduler.
IO Scheduler Selection Issue in 8.3 and 8.4
If default IO scheduler selection issues are noticed, then ensure you are running at RHEL 8.5, or later, in order to have a patch that corrects default io scheduler selections.A bug was introduced somewhere between RHEL 8.3 and 8.4 kernels (specifically within kernel 4.18.0-252.el8). The wrong io scheduler may end up being selected. Some customers may see their scheduler changing when upgrading from RHEL 8.3 to RHEL 8.4 environments without indication as to why.
RHEL8.2: (!)4.18.0-193.el8 27-Mar-2020 ok
4.18.0-235.el8 ok
RHEL8.3: (!)4.18.0-240.el8 23-Sep-2020 ok
4.18.0-252.el8 bad commit 8856c9842ca8 added from upstream
4.18.0-277.el8 bad
RHEL8.4: (!)4.18.0-305.el8 29-Apr-2021 bad
4.18.0-311.el8 fix added via commit cf6c57ea8d29
RHEL8.5: (!)4.18.0-348.el8 04-Oct-2021 fix included
RHEL8.6: (!)4.18.0-372.9.1.el8 15-Apr-2022 fix included
:
.
8856c9842ca8 blk-mq: Facilitate a shared sbitmap per tagset (broke default io scheduler selection in some cases)
cf6c57ea8d29 blk-mq: set default elevator as deadline in case of hctx shared tagset (fix for above)
The fix was released via Errata RHSA-2021:4356 in
kernel-4.18.0-348.el8(RHEL 8.5) and is present in 8.5 and later kernels.
Root Cause
-
Details on scheduler selection can be seen in the official documentation: 15.3. The default disk scheduler.
Block devices use the default disk scheduler unless you specify another scheduler. . NOTE For non-volatile Memory Express (NVMe) block devices specifically, the default scheduler is none and Red Hat recommends not changing this. . The kernel selects a default disk scheduler based on the type of device. The automatically selected scheduler is typically the optimal setting. If you require a different scheduler, Red Hat recommends to use udev rules or the Tuned application to configure it. Match the selected devices and switch the scheduler only for those devices.
This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.