diff options
Diffstat (limited to 'Documentation/block/cfq-iosched.txt')
-rw-r--r-- | Documentation/block/cfq-iosched.txt | 77 |
1 files changed, 77 insertions, 0 deletions
diff --git a/Documentation/block/cfq-iosched.txt b/Documentation/block/cfq-iosched.txt index 6d670f570451..d89b4fe724d7 100644 --- a/Documentation/block/cfq-iosched.txt +++ b/Documentation/block/cfq-iosched.txt | |||
@@ -1,3 +1,14 @@ | |||
1 | CFQ (Complete Fairness Queueing) | ||
2 | =============================== | ||
3 | |||
4 | The main aim of CFQ scheduler is to provide a fair allocation of the disk | ||
5 | I/O bandwidth for all the processes which requests an I/O operation. | ||
6 | |||
7 | CFQ maintains the per process queue for the processes which request I/O | ||
8 | operation(syncronous requests). In case of asynchronous requests, all the | ||
9 | requests from all the processes are batched together according to their | ||
10 | process's I/O priority. | ||
11 | |||
1 | CFQ ioscheduler tunables | 12 | CFQ ioscheduler tunables |
2 | ======================== | 13 | ======================== |
3 | 14 | ||
@@ -25,6 +36,72 @@ there are multiple spindles behind single LUN (Host based hardware RAID | |||
25 | controller or for storage arrays), setting slice_idle=0 might end up in better | 36 | controller or for storage arrays), setting slice_idle=0 might end up in better |
26 | throughput and acceptable latencies. | 37 | throughput and acceptable latencies. |
27 | 38 | ||
39 | back_seek_max | ||
40 | ------------- | ||
41 | This specifies, given in Kbytes, the maximum "distance" for backward seeking. | ||
42 | The distance is the amount of space from the current head location to the | ||
43 | sectors that are backward in terms of distance. | ||
44 | |||
45 | This parameter allows the scheduler to anticipate requests in the "backward" | ||
46 | direction and consider them as being the "next" if they are within this | ||
47 | distance from the current head location. | ||
48 | |||
49 | back_seek_penalty | ||
50 | ----------------- | ||
51 | This parameter is used to compute the cost of backward seeking. If the | ||
52 | backward distance of request is just 1/back_seek_penalty from a "front" | ||
53 | request, then the seeking cost of two requests is considered equivalent. | ||
54 | |||
55 | So scheduler will not bias toward one or the other request (otherwise scheduler | ||
56 | will bias toward front request). Default value of back_seek_penalty is 2. | ||
57 | |||
58 | fifo_expire_async | ||
59 | ----------------- | ||
60 | This parameter is used to set the timeout of asynchronous requests. Default | ||
61 | value of this is 248ms. | ||
62 | |||
63 | fifo_expire_sync | ||
64 | ---------------- | ||
65 | This parameter is used to set the timeout of synchronous requests. Default | ||
66 | value of this is 124ms. In case to favor synchronous requests over asynchronous | ||
67 | one, this value should be decreased relative to fifo_expire_async. | ||
68 | |||
69 | slice_async | ||
70 | ----------- | ||
71 | This parameter is same as of slice_sync but for asynchronous queue. The | ||
72 | default value is 40ms. | ||
73 | |||
74 | slice_async_rq | ||
75 | -------------- | ||
76 | This parameter is used to limit the dispatching of asynchronous request to | ||
77 | device request queue in queue's slice time. The maximum number of request that | ||
78 | are allowed to be dispatched also depends upon the io priority. Default value | ||
79 | for this is 2. | ||
80 | |||
81 | slice_sync | ||
82 | ---------- | ||
83 | When a queue is selected for execution, the queues IO requests are only | ||
84 | executed for a certain amount of time(time_slice) before switching to another | ||
85 | queue. This parameter is used to calculate the time slice of synchronous | ||
86 | queue. | ||
87 | |||
88 | time_slice is computed using the below equation:- | ||
89 | time_slice = slice_sync + (slice_sync/5 * (4 - prio)). To increase the | ||
90 | time_slice of synchronous queue, increase the value of slice_sync. Default | ||
91 | value is 100ms. | ||
92 | |||
93 | quantum | ||
94 | ------- | ||
95 | This specifies the number of request dispatched to the device queue. In a | ||
96 | queue's time slice, a request will not be dispatched if the number of request | ||
97 | in the device exceeds this parameter. This parameter is used for synchronous | ||
98 | request. | ||
99 | |||
100 | In case of storage with several disk, this setting can limit the parallel | ||
101 | processing of request. Therefore, increasing the value can imporve the | ||
102 | performace although this can cause the latency of some I/O to increase due | ||
103 | to more number of requests. | ||
104 | |||
28 | CFQ IOPS Mode for group scheduling | 105 | CFQ IOPS Mode for group scheduling |
29 | =================================== | 106 | =================================== |
30 | Basic CFQ design is to provide priority based time slices. Higher priority | 107 | Basic CFQ design is to provide priority based time slices. Higher priority |