IO scheduler is changing to undesirable values
This document (000021225) is provided subject to the disclaimer at the end of this document.
Environment
SLES 12
Situation
The systemd-udevd service is responsible for IO scheduler setting for disk or device-mapper devices. IO scheduler settings might be in conflict by other tools like saptune, that adjust environment to certain application demands.
Under certain conditions it is necessary adjust IO scheduler by udev rules, respectively udev behavior to your needs, for example if storage improperly returns information about media (rotational, solid drives, etc) or if application vendor requirements on the value are different.
Resolution
-
Copy preconfigured udev rules file into /etc/udev/rules.d/ directory:
cp /usr/lib/udev/rules.d/60-io-scheduler.rules /etc/udev/rules.d/
-
Edit the file by your favorite text editor (vim, emacs, etc ) and adjust the config file regarding to your needs.
For example, udev enforces BFQ IO scheduler on your dm-* devices, when for some reason, and you need IO scheduler set as "none". The file has to exist and modified to your needs.
Example below defines udev rule #1 in the rules file to be sure you keep BFQ value for single-queue HDD devices only:
vi /etc/udev/rules.d/60-io-scheduler.rules
# 1. BFQ scheduler for single-queue HDD
ATTR{queue/rotational}!="0", TEST!="%S%p/mq/1", ATTR{queue/scheduler}="bfq", GOTO="scheduler_end" # <-------------- this is the rule which needs to be uncommented in this example
# 2. BFQ scheduler for every HDD, including "real" multiqueue
# ATTR{queue/rotational}!="0", ATTR{queue/scheduler}="bfq", GOTO="scheduler_end"
# 4. BFQ scheduler for every device (uncomment if you need ionice or blk-cgroup features)
# ATTR{queue/scheduler}="bfq", GOTO="scheduler_end"
-
Reload the udev rules and apply wanted settings:
udevadm control --reload && udevadm trigger
Contact to SUSE support is recommended for consulting proper settings to your needs.
NOTE: Generally, it's not recommend change manually IO scheduler. Users should do this from udev rules.
Cause
Under such circumstances you need to adjust udev rules and uncomment particular line to achieve wanted IO scheduler settings for your device/LUN. Or at least the existence of the udev rules file on the right place could be sufficient to achieve the proper IO scheduler settings.
Additional Information
lsblk -i -o 'NAME,KNAME,MODEL,SCHED,MOUNTPOINT'
Disclaimer
This Support Knowledgebase provides a valuable tool for SUSE customers and parties interested in our products and solutions to acquire information, ideas and learn from one another. Materials are provided for informational, personal or non-commercial use within your organization and are presented "AS IS" WITHOUT WARRANTY OF ANY KIND.
- Document ID:000021225
- Creation Date: 05-Oct-2023
- Modified Date:10-Oct-2023
-
- SUSE Linux Enterprise Server
- SUSE Linux Enterprise Server for SAP Applications
For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com