Skip to contentSkip to conversation

Documentation: cfq-iosched: update documentation help for cfq tunnables

PATCH In review Namjae Jeon 3 participants 5 messages Mar 31, 2013 – Apr 14, 2013

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 Documentation: cfq-iosched: update documentation help for cfq tunnables

From: Namjae Jeon <[email protected]>

Add the documentation text for latency, target_latency & group_idle tunnable parameters in the block/cfq-iosched.txt.
Also fix few typo(spelling) mistakes.

---
 Documentation/block/cfq-iosched.txt |   47 ++++++++++++++++++++++++++++++++---
 1 file changed, 44 insertions(+), 3 deletions(-)
Documentation/block/cfq-iosched.txt +44 -3
index a5eb7d1..4d02bca 100644
@@ -5,7 +5,7 @@ The main aim of CFQ scheduler is to provide a fair allocation of the disk
 I/O bandwidth for all the processes which requests an I/O operation.
 
 CFQ maintains the per process queue for the processes which request I/O
-operation(syncronous requests). In case of asynchronous requests, all the
+operation(synchronous requests). In case of asynchronous requests, all the
 requests from all the processes are batched together according to their
 process's I/O priority.
 
@@ -66,6 +66,47 @@ This parameter is used to set the timeout of synchronous requests. Default
 value of this is 124ms. In case to favor synchronous requests over asynchronous
 one, this value should be decreased relative to fifo_expire_async.
 
+group_idle
+-----------
+This parameter forces idling at the CFQ group level instead of CFQ
+queue level. This is introduced after after a bottleneck was observed
+in higher end storage due to idle on sequential queuee and allow dispatch
+from a single queue. The idea with this parameter is that it be be run with
+slice_idle=0 and group_idle=8, so that idling does not happen on individual
+queues in the group but happens overall on the group and still keep the IO
+controller working.
+Not idling on individual queues in the group will dispatch requests from
+multiple queues in the group at the same time and achieve higher throughput
+on higher end storage.
+
+Default value for this parameter is 8ms.
+
+latency
+-------
+This parameter is used to enable/disable the latency mode of the CFQ
+scheduler. So if latency mode (called low_latency) is enabled, then CFQ tries
+to recompute the slice time for each process based on the target_latency set
+for the system. This favors the fairness over throughput. Disabling low
+latency (setting it to 0) ignores target latency, allowing each process in the
+system to get a full time slice.
+
+By default low latency mode is enabled.
+
+target_latency
+--------------
+This parameter is used to calculate the time slice for a process if cfq's
+latency mode is enabled. It will ensure that sync requests have an estimated
+latency. But sometime if sequential workload is more (e.g. sequential read),
+then to meet the latency constraints, throughput may decrease because of less
+time for each process to issue I/O request before the cfq queue is switched.
+
+Though this can be overcome by disabling the latency_mode, but it may increase
+the read latency for some applications. So, this parameter allows for changing
+target_latency through sysfs interface which can provide the balanced
+throughput and read latency.
+
+Default value for target_latency is 300ms.
+
 slice_async
 -----------
 This parameter is same as of slice_sync but for asynchronous queue. The
@@ -98,8 +139,8 @@ in the device exceeds this parameter. This parameter is used for synchronous
 request.
 
 In case of storage with several disk, this setting can limit the parallel
-processing of request. Therefore, increasing the value can imporve the
-performace although this can cause the latency of some I/O to increase due
+processing of request. Therefore, increasing the value can improve the
+performance although this can cause the latency of some I/O to increase due
 to more number of requests.
 
 CFQ Group scheduling
Signature · 1 line
1.7.9.5
#2 lore raw

2013/4/9 Jens Axboe <[email protected]>:

Quoted 9 lines · Namjae Jeon
Quoted 5 lines

From: Namjae Jeon <[email protected]>

Add the documentation text for latency, target_latency & group_idle tunnable parameters in the block/cfq-iosched.txt.
Also fix few typo(spelling) mistakes.

Thanks, merged with various fixups to the language. You can see the end-result here:

Thanks Jens !. I checked.

Quoted 6 lines

http://git.kernel.dk/?p=linux-block.git;a=commit;h=fdc6fdc52e4630f5020281ce5450be7cc1887de2

--
Jens Axboe

#3 lore raw
In reply to Namjae Jeon

Cleaning out "look at this" directory, I don't see this applied upstream but it may already be in Jens' tree. (That's the tree it should go in through...)

Quoted 37 lines · Namjae Jeon

From: Namjae Jeon <[email protected]>

Add the documentation text for latency, target_latency & group_idle tunnable parameters in the block/cfq-iosched.txt.
Also fix few typo(spelling) mistakes.

---
 Documentation/block/cfq-iosched.txt |   47  
++++++++++++++++++++++++++++++++---
 1 file changed, 44 insertions(+), 3 deletions(-)
Documentation/block/cfq-iosched.txt +0 -0
index a5eb7d1..4d02bca 100644
@@ -5,7 +5,7 @@ The main aim of CFQ scheduler is to provide a fair  

allocation of the disk
I/O bandwidth for all the processes which requests an I/O operation.

CFQ maintains the per process queue for the processes which request
I/O
-operation(syncronous requests). In case of asynchronous requests, all the
+operation(synchronous requests). In case of asynchronous requests, all the
requests from all the processes are batched together according to
their
process's I/O priority.

Documentation/block/cfq-iosched.txt +0 -0
@@ -66,6 +66,47 @@ This parameter is used to set the timeout of  

synchronous requests. Default
value of this is 124ms. In case to favor synchronous requests over
asynchronous
one, this value should be decreased relative to fifo_expire_async.

Documentation/block/cfq-iosched.txt This parameter is used to set the timeout of synchronous requests. Default · line 71

Quoted 3 lines
Documentation/block/cfq-iosched.txt +3 -0
+group_idle
+-----------
+This parameter forces idling at the CFQ group level instead of CFQ

You don't need to say "this parameter", you can just start with "Force idling at..."

Quoted 3 lines
Documentation/block/cfq-iosched.txt +2 -0
+queue level. This is introduced after after a bottleneck was observed
+in higher end storage due to idle on sequential queuee and allow  

dispatch

queuee

Quoted 11 lines

+from a single queue. The idea with this parameter is that it be be run with
+slice_idle=0 and group_idle=8, so that idling does not happen on individual
+queues in the group but happens overall on the group and still keep the IO

Documentation/block/cfq-iosched.txt +2 -0
+controller working.
+Not idling on individual queues in the group will dispatch requests  

from
+multiple queues in the group at the same time and achieve higher throughput

Documentation/block/cfq-iosched.txt This parameter is used to set the timeout of synchronous requests. Default · line 86

Quoted 7 lines
Documentation/block/cfq-iosched.txt +7 -0
+on higher end storage.
+
+Default value for this parameter is 8ms.
+
+latency
+-------
+This parameter is used to enable/disable the latency mode of the CFQ

"Enable/disable the latency mode..."

Documentation/block/cfq-iosched.txt This parameter is used to set the timeout of synchronous requests. Default · line 93

Quoted 11 lines

+scheduler. So if latency mode (called low_latency) is enabled, then CFQ tries
+to recompute the slice time for each process based on the target_latency set
+for the system. This favors the fairness over throughput. Disabling low
+latency (setting it to 0) ignores target latency, allowing each process in the

Documentation/block/cfq-iosched.txt +3 -0
+system to get a full time slice.
+
+By default low latency mode is enabled.

Why are latency and target_latency separate parameters? (0 already disables it... the logical thing to do...?)

I.E. why does this knob even exist separate from target_latency?

Quoted 17 lines
Documentation/block/cfq-iosched.txt +3 -0
+target_latency
+--------------
+This parameter is used to calculate the time slice for a process if  

cfq's
+latency mode is enabled. It will ensure that sync requests have an estimated
+latency. But sometime if sequential workload is more (e.g. sequential read),
+then to meet the latency constraints, throughput may decrease because of less
+time for each process to issue I/O request before the cfq queue is switched.

Documentation/block/cfq-iosched.txt +2 -0
+
+Though this can be overcome by disabling the latency_mode, but it  

may increase
+the read latency for some applications. So, this parameter allows for changing

Documentation/block/cfq-iosched.txt This parameter is used to set the timeout of synchronous requests. Default · line 108

Quoted 4 lines
Documentation/block/cfq-iosched.txt +4 -0
+target_latency through sysfs interface which can provide the balanced
+throughput and read latency.
+
+Default value for target_latency is 300ms.

Sorry, I try not to rewrite, but this whole section can just be:

Cap outstanding I/O requests to this many miliseconds (default 300), ensuring sync requests have an estimated latency. Lowering this may decrease throughput on sequential workloads by switching queues more often (interleaving other I/O).

(And it could ahve been called target_latency_ms to be self-documenting. Oh well.)

Rob

maintainer
#4 lore raw
Quoted 3 lines · Rob Landley

Cleaning out "look at this" directory, I don't see this applied upstream but it may already be in Jens' tree. (That's the tree it should go in through...)

It's already included, see:

http://git.kernel.dk/?p=linux-block.git;a=commit;h=fdc6fdc52e4630f5020281ce5450be7cc1887de2

I changed some of the wording. But since this is your forte, please do send any incremental patches against what is already in there.

Signature · 1 line
Jens Axboe