cfq-iosched.txt 2.2 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. CFQ ioscheduler tunables
  2. ========================
  3. slice_idle
  4. ----------
  5. This specifies how long CFQ should idle for next request on certain cfq queues
  6. (for sequential workloads) and service trees (for random workloads) before
  7. queue is expired and CFQ selects next queue to dispatch from.
  8. By default slice_idle is a non-zero value. That means by default we idle on
  9. queues/service trees. This can be very helpful on highly seeky media like
  10. single spindle SATA/SAS disks where we can cut down on overall number of
  11. seeks and see improved throughput.
  12. Setting slice_idle to 0 will remove all the idling on queues/service tree
  13. level and one should see an overall improved throughput on faster storage
  14. devices like multiple SATA/SAS disks in hardware RAID configuration. The down
  15. side is that isolation provided from WRITES also goes down and notion of
  16. IO priority becomes weaker.
  17. So depending on storage and workload, it might be useful to set slice_idle=0.
  18. In general I think for SATA/SAS disks and software RAID of SATA/SAS disks
  19. keeping slice_idle enabled should be useful. For any configurations where
  20. there are multiple spindles behind single LUN (Host based hardware RAID
  21. controller or for storage arrays), setting slice_idle=0 might end up in better
  22. throughput and acceptable latencies.
  23. CFQ IOPS Mode for group scheduling
  24. ===================================
  25. Basic CFQ design is to provide priority based time slices. Higher priority
  26. process gets bigger time slice and lower priority process gets smaller time
  27. slice. Measuring time becomes harder if storage is fast and supports NCQ and
  28. it would be better to dispatch multiple requests from multiple cfq queues in
  29. request queue at a time. In such scenario, it is not possible to measure time
  30. consumed by single queue accurately.
  31. What is possible though is to measure number of requests dispatched from a
  32. single queue and also allow dispatch from multiple cfq queue at the same time.
  33. This effectively becomes the fairness in terms of IOPS (IO operations per
  34. second).
  35. If one sets slice_idle=0 and if storage supports NCQ, CFQ internally switches
  36. to IOPS mode and starts providing fairness in terms of number of requests
  37. dispatched. Note that this mode switching takes effect only for group
  38. scheduling. For non-cgroup users nothing should change.