SUSE Support

Here When You Need Us

IO scheduler is changing to undesirable values

This document (000021225) is provided subject to the disclaimer at the end of this document.

Environment

SLES 15
SLES 12

Situation

The server enforce unwanted IO scheduler type for the disk device, even it's manually configured or handled by tools like saptune. The setting is reverting everytime when udev rules has appllied. For example when you reloaded MPIO settings with "multipath -r" or "udevadm trigger", that invokes udev to change type of IO scheduler.

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

  1.  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/
 
  1.  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"


  1. 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

As some storage devices can report back improper disk types and /or not respond to SCSI query, the udev subsystem might decide to setup IO scheduler with unwanted value(s).
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

How to check IO scheduler settings:
 
 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

< Back to Support Search

For questions or concerns with the SUSE Knowledgebase please contact: tidfeedback[at]suse.com

tick icon

SUSE Support Forums

Get your questions answered by experienced Sys Ops or interact with other SUSE community experts.

tick icon

Support Resources

Learn how to get the most from the technical support you receive with your SUSE Subscription, Premium Support, Academic Program, or Partner Program.

tick icon

Open an Incident

Open an incident with SUSE Technical Support, manage your subscriptions, download patches, or manage user access.