deadline-iosched.txt 2.8 KB

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