Blame view
Documentation/block/deadline-iosched.txt
2.77 KB
1da177e4c Linux-2.6.12-rc2 |
1 2 3 4 5 6 |
Deadline IO scheduler tunables ============================== This little file attempts to document how the deadline io scheduler works. In particular, it will clarify the meaning of the exposed tunables that may be of interest to power users. |
23c76983e Some IO scheduler... |
7 8 9 10 |
Selecting IO schedulers ----------------------- Refer to Documentation/block/switching-sched.txt for information on selecting an io scheduler on a per-device basis. |
1da177e4c Linux-2.6.12-rc2 |
11 12 13 14 15 16 17 |
******************************************************************************** read_expire (in ms) ----------- |
a2ffd2751 Fix typos in Docu... |
18 |
The goal of the deadline io scheduler is to attempt to guarantee a start |
1da177e4c Linux-2.6.12-rc2 |
19 20 21 |
service time for a request. As we focus mainly on read latencies, this is tunable. When a read request first enters the io scheduler, it is assigned a deadline that is the current time + the read_expire value in units of |
2fe0ae78c Fix typos in Docu... |
22 |
milliseconds. |
1da177e4c Linux-2.6.12-rc2 |
23 24 25 26 27 28 |
write_expire (in ms) ----------- Similar to read_expire mentioned above, but for writes. |
6a421c1dc block: update doc... |
29 |
fifo_batch (number of requests) |
1da177e4c Linux-2.6.12-rc2 |
30 |
---------- |
6a421c1dc block: update doc... |
31 32 33 34 35 36 37 38 39 |
Requests are grouped into ``batches'' of a particular data direction (read or write) which are serviced in increasing sector order. To limit extra seeking, deadline expiries are only checked between batches. fifo_batch controls the maximum number of requests per batch. This parameter tunes the balance between per-request latency and aggregate throughput. When low latency is the primary concern, smaller is better (where a value of 1 yields first-come first-served behaviour). Increasing fifo_batch generally improves throughput, at the cost of latency variation. |
1da177e4c Linux-2.6.12-rc2 |
40 |
|
23c76983e Some IO scheduler... |
41 42 |
writes_starved (number of dispatches) -------------- |
1da177e4c Linux-2.6.12-rc2 |
43 44 45 46 47 48 49 50 51 52 53 |
When we have to move requests from the io scheduler queue to the block device dispatch queue, we always give a preference to reads. However, we don't want to starve writes indefinitely either. So writes_starved controls how many times we give preference to reads over writes. When that has been done writes_starved number of times, we dispatch some writes based on the same criteria as reads. front_merges (bool) ------------ |
19f594600 trivial: Miscella... |
54 |
Sometimes it happens that a request enters the io scheduler that is contiguous |
1da177e4c Linux-2.6.12-rc2 |
55 56 57 58 59 60 61 62 63 |
with a request that is already on the queue. Either it fits in the back of that request, or it fits at the front. That is called either a back merge candidate or a front merge candidate. Due to the way files are typically laid out, back merges are much more common than front merges. For some work loads, you may even know that it is a waste of time to spend any time attempting to front merge requests. Setting front_merges to 0 disables this functionality. Front merges may still occur due to the cached last_merge hint, but since that comes at basically 0 cost we leave that on. We simply disable the rbtree front sector lookup when the io scheduler merge function is called. |
26bbb29a2 Update Jens Axboe... |
64 |
Nov 11 2002, Jens Axboe <jens.axboe@oracle.com> |
1da177e4c Linux-2.6.12-rc2 |
65 |