SUSE Support

Here When You Need Us

Incorrect Maximum I/O Sector Size for Storage Device

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

Environment

SUSE Linux Enterprise Server 15 all Service Packs

Situation

There are some storage devices that advertise a maximum block size which is not optimal for sustained performance.
Optimal maximum block size for sustained performance recommendation can be obtained from storage vendor.
 

For example, the default max sector size parameter value may need to be changed to 16kB.

The current value could be verified by:
# cat /sys/block/sda/queue/max_sectors_kb
64

* replace the device (sda) with the correct device.  For NVMe devices the equivalent device-naming nvme0n1.

Resolution

Change the default settings to meet the storage device requirements to avoid performance issues.

Example: Settings max IO size to 16kB for device /dev/sda :
 
  1. Temporary settings may be changed instantly with:

     

    echo <value> > /sys/block/sdX/queue/max_sectors_kb
     

    # echo 16 > /sys/block/sda/queue/max_sectors_kb

     

  2. Permanent changes surviving across reboots can be done by udev rules:
     

    Create a udev-rule file in /etc/udev/rules.d/ directory :

    # vi /etc/udev/rules.d/77-persistent-max_sectors_kb.rules
    ACTION=="add|change", SUBSYSTEM=="block", ATTR{queue/max_sectors_kb}="16"

    NOTE: The above udev rule limits I/O size to 16kB  (max_sectors_kb) for all block devices. It may be required to adjust the rule according to specific needs.


    If the changes need to be applied immediately, the udev rule might be enforced by:

    # udevadm control --reload && udevadm trigger

    And verify the settings:

    # grep -H '' /sys/block/*/queue/max_sectors_kb

Status

Top Issue

Additional Information

Link to kernel.org and referring parameter:
https://www.kernel.org/doc/html/v5.14/block/queue-sysfs.html#max-sectors-kb-rw
Documentation related to the UDEV rules:
https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-udev.html
NOTE: can also be configured as MPIO parameter at multipath level. Details can be found at the link below:
https://documentation.suse.com/sles/15-SP5/html/SLES-all/cha-multipath.html#sec-multipath-conf-misc

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:000021427
  • Creation Date: 12-Apr-2024
  • Modified Date:15-May-2024
    • SUSE Linux Enterprise Server

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