Path: blob/master/Documentation/block/deadline-iosched.txt
10821 views
Deadline IO scheduler tunables1==============================23This little file attempts to document how the deadline io scheduler works.4In particular, it will clarify the meaning of the exposed tunables that may be5of interest to power users.67Selecting IO schedulers8-----------------------9Refer to Documentation/block/switching-sched.txt for information on10selecting an io scheduler on a per-device basis.111213********************************************************************************141516read_expire (in ms)17-----------1819The goal of the deadline io scheduler is to attempt to guarantee a start20service time for a request. As we focus mainly on read latencies, this is21tunable. When a read request first enters the io scheduler, it is assigned22a deadline that is the current time + the read_expire value in units of23milliseconds.242526write_expire (in ms)27-----------2829Similar to read_expire mentioned above, but for writes.303132fifo_batch (number of requests)33----------3435Requests are grouped into ``batches'' of a particular data direction (read or36write) which are serviced in increasing sector order. To limit extra seeking,37deadline expiries are only checked between batches. fifo_batch controls the38maximum number of requests per batch.3940This parameter tunes the balance between per-request latency and aggregate41throughput. When low latency is the primary concern, smaller is better (where42a value of 1 yields first-come first-served behaviour). Increasing fifo_batch43generally improves throughput, at the cost of latency variation.444546writes_starved (number of dispatches)47--------------4849When we have to move requests from the io scheduler queue to the block50device dispatch queue, we always give a preference to reads. However, we51don't want to starve writes indefinitely either. So writes_starved controls52how many times we give preference to reads over writes. When that has been53done writes_starved number of times, we dispatch some writes based on the54same criteria as reads.555657front_merges (bool)58------------5960Sometimes it happens that a request enters the io scheduler that is contiguous61with a request that is already on the queue. Either it fits in the back of that62request, or it fits at the front. That is called either a back merge candidate63or a front merge candidate. Due to the way files are typically laid out,64back merges are much more common than front merges. For some work loads, you65may even know that it is a waste of time to spend any time attempting to66front merge requests. Setting front_merges to 0 disables this functionality.67Front merges may still occur due to the cached last_merge hint, but since68that comes at basically 0 cost we leave that on. We simply disable the69rbtree front sector lookup when the io scheduler merge function is called.707172Nov 11 2002, Jens Axboe <[email protected]>7374757677