System information
162 System Analysis and Tuning Guide
echo SCHEDULER > /sys/block/DEVICE/queue/scheduler
where SCHEDULER is one of cfq, noop, or deadline and DEVICE the block de-
vice (sda for example).
NOTE: Default Schedulter on IBM System z
On IBM System z the default I/O scheduler for a storage device is set by the
device driver.
13.2 Available I/O Elevators
In the following elevators available on SUSE Linux Enterprise Server are listed. Each
elevator has a set of tunable parameters, which can be set with the following com-
mand:
echo VALUE > /sys/block/DEVICE/queue/iosched/TUNABLE
where VALUE is the desired value for the TUNABLE and DEVICE the block device.
To find out which elevator is the current default, run the following command. The
currently selected scheduler is listed in brackets:
jupiter:~ # cat /sys/block/sda/queue/scheduler
noop deadline [cfq]
13.2.1 CFQ (Completely Fair Queuing)
CFQ is a fairness-oriented scheduler and is used by default on SUSE Linux Enterprise
Server. The algorithm assigns each thread a time slice in which it is allowed to submit
I/O to disk. This way each thread gets a fair share of I/O throughput. It also allows as-
signing tasks I/O priorities which are taken into account during scheduling decisions
(see man 1 ionice). The CFQ scheduler has the following tunable parameters:
/sys/block/<device>/queue/iosched/slice_idle
When a task has no more I/O to submit in its time slice, the I/O scheduler waits
for a while before scheduling the next thread to improve locality of I/O. For me-
dia where locality does not play a big role (SSDs, SANs with lots of disks) setting
/sys/block/<device>/queue/iosched/slice_idle to 0 can im-
prove the throughput considerably.