28.4 Tuning I/O Schedulers

I/O scheduling controls how read and write operations are submitted to block storage devices, such as single ATA disk systems, solid state drives, RAID arrays, and SAN storage arrays. A scheduler queues and sequences requests to reduce latency and optimize I/O performance. Configuring the best-suited I/O scheduler depends on the application workloads and storage hardware. Different combinations of workloads and storage solutions require different tuning strategies. You can configure I/O scheduler settings per storage device to optimize the performance based on the applications that access files on that device.

This section describes I/O scheduling options that can help reduce seek operations, prioritize I/O requests, and ensure that an I/O request is carried out before a given deadline. These tuning options are specifically designed for sequential physical read performance and have no impact on cache read and write performance.

For more information on the tuning parameters, see Tuning I/O Performance in the SLES 12 SP2 System Analysis and Tuning Guide.

28.4.1 Single I/O Context (SIOC)

The SIOC option allows you to specify the same I/O context for all the kernel worker threads used by the NSS filesystem to read file contents from disk, using a Finite State Machine (FSM). Every kernel thread maintains an I/O context structure that is used by the I/O scheduler to identify the per-process CFQ queues into which the I/O request can be temporarily queued before being dispatched to the underlying logical/physical device queue. The anticipates additional consecutive disk blocks requests from the same thread, so all of the requests can be merged and submitted as one single request instead of multiple small requests. Enabling the SIOC improves I/O performance by ensuring that all related requests are placed into the same CFQ queue even if they are submitted from different NSS kernel worker threads.

This option helps improve I/O performance for file access patterns using multiple NCP/CIFS protocol clients.

To see whether this option is ON or OFF, execute nsscon /find=iocontextsharing

To change the setting:

  1. Edit /etc/opt/novell/nss/nssstart.cfg.

  2. Add /IOContextSharing.

  3. Reboot the server.

28.4.2 REQ_NOIDLE (Submit Request Without Idling)

The REQ_NOIDLE NSS file system option helps physical (non-cached) reads of files from a single file system client. The option uses a flag provided by the Linux block layer to tell the CFQ I/O scheduler to place the submitted I/O request in separate CFQ queues during reads or writes, with no waiting for additional merges. The block requests submitted to the CFQ I/O scheduler are given to the underlying logical/physical disk driver without any idling.

To see whether this option is ON or OFF, execute nsscon /find=req_noidle_enabled

To change the setting:

  1. Edit /etc/opt/novell/nss/nssstart.cfg.

  2. Add /REQ_NOIDLE_Enabled.

  3. Reboot the server.

28.4.3 Deadline Scheduler

The deadline scheduler applies a service deadline to each incoming request. This sets a cap on per-request latency and ensures good disk throughput. Service queues are prioritized by deadline expiration, making this a good choice for real-time applications, databases and other disk-intensive applications.

To view the current scheduler, enter the following command:

cat /sys/block/<DEVICE-NAME>/queue/scheduler

To change the scheduler, enter the following command:

echo deadline > /sys/block/<DEVICE-NAME>/queue/scheduler

This option is not persistent. When a server is rebooted, the setting returns to the default.

For a multi-path environment, change the I/O scheduler at the device mapper level.

28.4.4 Completely Fair Queuing (CFQ)

The Completely Fair Queuing (CFQ) scheduler provides a good compromise between throughput and latency by treating all competing IO processes alike. The algorithm assigns each thread a time slice in which it is allowed to submit I/O to disk, so each thread gets a fair share of I/O throughput. It also allows you to assign I/O priorities, which are taken into account during scheduling decisions.

Tune slice_idle parameter to improve the backup, compression and decompression performance.

To see the current value of the slice_idle parameter, use the following command:

cat /sys/block/<DEVICE-NAME>/queue/iosched/slice_idle

To tune the slice_idle parameter, use the following command:

echo 0 > /sys/block/<DEVICE-NAME>/queue/iosched/slice_idle

This is not persistent. When a server is rebooted, the setting returns to the default.

To improve the performance of the physical read in a multi-user environment, disable low_latency parameter using the following command:

echo 0 > /sys/block/<DEVICE-NAME>/queue/iosched/low_latency

When a server is rebooted, the setting returns to the default.

For a multi-path environment, change the I/O scheduler at the device mapper level.