From: Corey Hickey <bugfood-ml@fatooh.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] Need Clarification on TBF + (PRIO+SFQ)
Date: Mon, 15 Mar 2004 09:35:44 +0000 [thread overview]
Message-ID: <405578F0.10201@fatooh.org> (raw)
In-Reply-To: <ILECICAFAJIIMPBBLMEAMEJGCPAA.gerryw@objectivedomain.com>
Gerry Weaver wrote:
> Hi All,
>
> I need help to understand the proper order to create qdiscs. I'm trying to
> do the following:
>
> 1. Use the TBF to slow a 100mb link to 3mb
Check the "UNITS" section of the tc manual to make sure you don't get
"mbit" confused with "mbps". In tc unit nomenclature, "kb" and "mb"
refer to quantities rather than bandwidths.
> 2. Use PRIO to prioritize the traffic
> 3. Use SFQ to hand out bandwidth to each PRIO class fairly
>
> Here's my question. What order should the qdiscs be in? For example:
>
> ROOT->TBF->PRIO[1,2,3]->SFQ or ROOT->PRIO[1,2,3]->SFQ->TBF
>
Well, the first cannot work because TBF is a classless discipline, and
as such cannot have child qdiscs. The second cannot work because sfq is
also classless (and even if it were, I don't think that configuration
would do what you want.
Try htb. I'm going to assume you mean "mbit"; you'll want to tweak other
parameters, too. This (untested) example won't behave exactly like PRIO,
but I think you could modify it to do so by changing each class' rate to
0mbit (remember that's the guaranteed rate) and let them take their
shares of the bandwidth solely based on prio. htb allows for what are
usually more elegant solutions to bandwidth prioritization, though, so
what I've written below allows the three classes to share bandwidth
disproportionately when they all have packets waiting.
tc qdisc add dev eth0 root handle htb
tc class add dev eth0 parent 1: classid 1:1 htb rate 3mbit
tc class add dev eth0 parent 1:1 classid 1:10 htb rate 1500kbit ceil \
3mbit prio 1
tc qdisc add dev eth0 parent 1:10 handle 10: sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:20 htb rate 1000kbit ceil \
3mbit prio 2
tc qdisc add dev eth0 parent 1:20 handle 20: sfq perturb 10
tc class add dev eth0 parent 1:1 classid 1:30 htb rate 500kbit ceil \
3mbit prio 3
tc qdisc add dev eth0 parent 1:30 handle 30: sfq perturb 10
(then write some filters attached to 1: to pass packets to 1:10, 1:20,
and 1:30)
-Corey
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
prev parent reply other threads:[~2004-03-15 9:35 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-03-15 5:45 [LARTC] Need Clarification on TBF + (PRIO+SFQ) Gerry Weaver
2004-03-15 9:35 ` Corey Hickey [this message]
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=405578F0.10201@fatooh.org \
--to=bugfood-ml@fatooh.org \
--cc=lartc@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.