From: Andreas Klauer <Andreas.Klauer@metamorpher.de>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB, strange capacity distribution
Date: Tue, 21 Feb 2006 07:52:49 +0000 [thread overview]
Message-ID: <20060221075249.GA10343@EIS> (raw)
In-Reply-To: <131577286.20060220225933@elusion.sk>
On Tue, Feb 21, 2006 at 12:49:59AM +0100, Boris Gereg wrote:
> (first of all, please, how to reply to some article in LARTC via mail
> to post it into right thread?)
Using 'reply all', or 'reply list' if your mail software offers it.
If all else fails, just hit 'reply' and add the mailing list to CC.
> So, I am definitely shaping outgoing traffic (upstream)
Yes, outgoing traffic from router to your network, which actually
contains the downstream traffic from the internet. Right?
> tc -d class show dev eth0
>
> class htb 1:2 root rate 100000Kbit ceil 100000Kbit burst 51587b/8 mpu
> 0b overhead 0b cburst 51587b/8 mpu 0b overhead 0b level 7
>
> class htb 1:2000 parent 1:2 leaf 2000: prio 0 quantum 200000 rate
> 50000Kbit ceil 100000Kbit burst 26593b/8 mpu 0b overhead 0b cburst
> 51587b/8 mpu 0b overhead 0b level 0
>
> class htb 1:3010 parent 1:2 leaf 3010: prio 1 quantum 1000 rate
> 64000bit ceil 256000bit burst 1631b/8 mpu 0b overhead 0b cburst
> 1727b/8 mpu 0b overhead 0b level 0
>
> class htb 1:3020 parent 1:2 leaf 3020: prio 2 quantum 1600 rate
> 128000bit ceil 768000bit burst 1663b/8 mpu 0b overhead 0b cburst
> 1983b/8 mpu 0b overhead 0b level 0
>
> class htb 1:3030 parent 1:2 leaf 3030: prio 3 quantum 6400 rate
> 512000bit ceil 2048Kbit burst 1855b/8 mpu 0b overhead 0b cburst
> 2623b/8 mpu 0b overhead 0b level 0
>
> class htb 1:5040 parent 1:2 leaf 5040: prio 4 quantum 4825 rate
> 386000bit ceil 386000bit burst 1792b/8 mpu 0b overhead 0b cburst
> 1792b/8 mpu 0b overhead 0b level 0
It's as I suspected, your current HTB tree looks like this:
1: HTB Qdisc
|
\--- 1:2 HTB root class (100000Kbit:100000kbit)
|
\--- 1:2000 HTB leaf class (50000Kbit:100000Kbit)
\--- 1:3010 HTB leaf class (64000bit:256000bit)
\--- 1:3020 HTB leaf class (128000bit:768000bit)
\--- 1:3030 HTB leaf class (512000bit:2048Kbit)
\--- 1:5040 HTB leaf class (386000bit:386000bit)
HTB classes borrow from their parent; in this setup, the parent class
offers a whopping 100000Kbit for that purpose. Unless the 1:2000 class
has got a very high priority and is maxing out the line all the time,
there is no limit to borrowing at all, because the other classes will
never reach the 100000Kbit from their parent.
So the classes above are actually not limited by their rate, but by
their ceil; the only class that will respect its rate in this setup
is 1:5040, because it's got the same rate and ceil.
Assuming that 1:5040 was your P2P class, if you set the ceil of this
class to 2048Kbit, it will (try to) use 2048Kbit at all times, because
the parent (thinks it) is able to offer it.
You need a class that knows of your total internet bandwidth somewhere.
Assuming that it is 2048Kbit, your tree should maybe look more like this:
1: HTB Qdisc
|
\--- 1:2 HTB root class (100000Kbit:100000kbit)
|
\--- 1:2000 HTB leaf class (50000Kbit:100000Kbit)
|
\--- 1:3000 HTB parent class (2048Kbit:2048Kbit)
|
\--- 1:3010 HTB leaf class (64000bit:256000bit)
\--- 1:3020 HTB leaf class (128000bit:768000bit)
\--- 1:3030 HTB leaf class (512000bit:2048Kbit)
\--- 1:5040 HTB leaf class (386000bit:386000bit)
In this setup, the 2048Kbit class is the limiting factor for the leaf
classes, except for the 1:2000 class, which should be used for local
LAN traffic only.
HTH
Andreas Klauer
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
next prev parent reply other threads:[~2006-02-21 7:52 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2006-02-20 21:59 [LARTC] HTB, strange capacity distribution Boris Gereg
2006-02-20 22:59 ` Andreas Klauer
2006-02-21 7:52 ` Andreas Klauer [this message]
2006-02-21 13:21 ` Boris Gereg
2006-02-22 17:15 ` Andreas Klauer
2006-02-23 7:11 ` Andreas Klauer
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=20060221075249.GA10343@EIS \
--to=andreas.klauer@metamorpher.de \
--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.