Mar 242015

The deadline I/O scheduler attempts to provide a guaranteed latency for requests. Deadline executes I/O Operations (IOPs) through the concept of batches, by default, reads are given priority over writes.

Deadline Scheduler Tunable Parameters

front_merges – default 1 / e.g. 0 – You can set this tunable to 0 if you know your workload will not generate front merges. Back merges are more common than front merges, setting front_merges to 0 disables this functionality. This tunable disables front sector lookup when the I/O scheduler merging function is called. Disk merge totals are recorded per-block device in /proc/diskstats

read_expire – default 500 / e.g. 150 – This tunable allows you to set the number of milliseconds in which a read request should be serviced. Deadline attempts to guarantee a start service time for a request. When a read request enters the scheduler, it is assigned a deadline that is the current time plus the read_expire value in milliseconds. This tunable controls the scheduler’s timing for an appropriate deadline/expiration for a batch.

write_expire – default 5000 / e.g. 1500 – This tunable allows you to set the number of milliseconds in which a write request should be serviced. Identical to the read_expire value but for write operations grouped into separate batches.

fifo_batch – default 16 / e.g. 12 – This determines the number of reads or writes to issue in a single batch. Setting this to a higher value may result in better throughput, but will also increase latency. Smaller batches can reduce latency by ensuring new requests are executed sooner, but may degrade overall throughput.

writes_starved – default 2 / e.g. 4 – This tunable controls how many read batches can be processed before processing a single write batch. The higher this is set, the more preference is given to reads. If application workload is read-heavy with only an occasional write, decreased latency of average IOPs may be achieved by increasing this value so that more reads are performed before a write is queued to disk.

See the following example, replace sda with the relevant disk device:

# echo "deadline" > /sys/block/sda/queue/scheduler
# echo 0 > /sys/block/sda/queue/iosched/front_merges
# echo 150 > /sys/block/sda/queue/iosched/read_expire
# echo 1500 > /sys/block/sda/queue/iosched/write_expire
# echo 12 > /sys/block/sda/queue/iosched/fifo_batch
# echo 4 > /sys/block/sda/queue/iosched/writes_starved


© 2011 Indimon Internet Services

Site last updated April 23, 2022 @ 10:45 am

Return to Top ▲Return to Top ▲