public inbox for netdev@vger.kernel.org 
 help / color / mirror / Atom feed
From: Patrick McHardy <kaber@trash•net>
To: Florian Westphal <fw@strlen•de>
Cc: netdev@vger•kernel.org, shemminger@vyatta•com
Subject: Re: [PATCH 5/5] tc: man: add man page for drr scheduler
Date: Wed, 13 Jan 2010 06:34:15 +0100	[thread overview]
Message-ID: <4B4D5B57.10903@trash.net> (raw)
In-Reply-To: <1263329126-19756-1-git-send-email-fw@strlen.de>

Florian Westphal wrote:

Thanks Florian. A few minor suggestions below.

> diff --git a/man/man8/tc-drr.8 b/man/man8/tc-drr.8
> new file mode 100644
> index 0000000..5fcb0eb
> --- /dev/null
> +++ b/man/man8/tc-drr.8
> @@ -0,0 +1,89 @@
> +.TH TC 8 "January 2010" "iproute2" "Linux"
> +.SH NAME
> +drr \- deficit round robin scheduler
> +.SH SYNOPSIS
> +.B tc qdisc ... add drr
> +.B [ quantum
> +bytes
> +.B ]
> +
> +.SH DESCRIPTION
> +
> +The Deficit Round Robin Scheduler is a classful queuing discipline as
> +a more flexible replacement for Stochastic Fairness Queuing.
> +
> +Unlike SFQ, there are no built-in queues \-\- you need to add classes
> +and then set up filters to classify packets accordingly.
> +This can be useful e.g. for using RED qdiscs with different settings for particular
> +traffic. There is no default class \-\- if a packet cannot be classified,
> +it is dropped.
> +
> +.SH ALGORITHM
> +Each class is assigned a deficit counter, initialized to
> +.B quantum.
> +
> +DRR maintains an (internal) ''active'' list of classes whose qdiscs are
> +non-empty.  This list is used for dequeuing.  A packet is dequeued from
> +the class at the head of the list if the packet size is smaller or equal
> +to the deficit counter.  If the counter is too small, it is increased by
> +.B quantum
> +and the scheduler moves on to the next class in the active list.
> +
> +
> +.SH PARAMETERS
> +.TP
> +quantum
> +Amount of bytes a flow is allowed to dequeue before the scheduler moves to the next.

next class or next flow?

> +Defaults to the MTU of the interface. The minimum value is 1.
> +
> +.SH EXAMPLE & USAGE
> +
> +To attach to device eth0, using the interface MTU as its quantum:
> +.P
> +# tc qdisc add dev eth0 handle 1 root drr
> +.P
> +Adding two classes:
> +.P
> +# tc class add dev eth0 parent 1: classid 1:1 drr
> +# tc class add dev eth0 parent 1: classid 1:2 drr
> +.P
> +You also need to add at least one filter to classify packets.
> +.P
> +# tc filter add dev eth0 protocol .. classid 1:1
> +.P
> +
> +Like SFQ, DRR is only useful when it owns the queue \-\- it is a pure scheduler and does
> +not delay packets.  Attaching non-work-conserving qdiscs like tbf to it does not make
> +sense \-\- other qdiscs in the active list will also become inactive until the dequeue
> +operation succeeds.  Embed DRR within another qdisc like HTB or HFSC to ensure it owns the queue.
> +.P
> +You can mimic SFQ behavior by assigning packets to the attached classes using the
> +hash filter:

flow filter

> +
> +.B tc qdisc add dev .. drr
> +.B for i in .. 1024;do
> +.B   tc class add dev ..  classid $handle:$(print %x $i)
> +.B   tc qdisc add dev .. fifo limit 16
> +.B done
> +.B tc filter add .. protocol ip .. $handle flow hash keys src,dst divisor 1024 perturb 10

To mimic SFQ, the filter needs to use "keys
src,dst,proto,proto-src,proto-dst".

> +
> +
> +.SH SOURCE
> +.TP
> +o
> +M. Shreedhar and George Varghese "Efficient Fair
> +Queuing using Deficit Round Robin", Proc. SIGCOMM 95.
> +
> +.SH NOTES
> +
> +This implementation does not drop packets from the longest queue on overrun,
> +as limits are handled by the individual child qdiscs.
> +
> +.SH SEE ALSO
> +.BR tc (8),
> +.BR tc-htb (8),
> +.BR tc-sfq (8)
> +
> +.SH AUTHOR
> +sched_drr was written by Patrick McHardy.
> +

  reply	other threads:[~2010-01-13  5:34 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-01-12 20:34 [iproute2] minor tc cleanup patches Florian Westphal
2010-01-12 20:39 ` [PATCH 1/5] tc: man: add limit parameter to tc-sfq man page Florian Westphal
2010-01-12 20:43 ` [PATCH 2/5] tc: man: SO_PRIORITY is described in socket documentation, not tc one Florian Westphal
2010-01-12 20:44 ` [PATCH 3/5] tc: red, gred, tbf: more helpful error messages Florian Westphal
2010-01-12 20:45 ` [PATCH 4/5] tc: remove stale code Florian Westphal
2010-01-12 20:45 ` [PATCH 5/5] tc: man: add man page for drr scheduler Florian Westphal
2010-01-13  5:34   ` Patrick McHardy [this message]
2010-01-13  8:27     ` Florian Westphal
2010-01-18 22:54   ` [PATCH 5/5 v2] " Florian Westphal
2010-01-21 18:13 ` [iproute2] minor tc cleanup patches Stephen Hemminger
2010-01-21 18:19   ` Patrick McHardy
2010-01-21 21:51     ` Stephen Hemminger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4B4D5B57.10903@trash.net \
    --to=kaber@trash$(echo .)net \
    --cc=fw@strlen$(echo .)de \
    --cc=netdev@vger$(echo .)kernel.org \
    --cc=shemminger@vyatta$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox