* [LARTC] HTB: why should "sum (rate of children) <= parent rate"?
@ 2003-05-18 17:18 Martin A. Brown
2003-05-18 18:13 ` Stef Coene
0 siblings, 1 reply; 2+ messages in thread
From: Martin A. Brown @ 2003-05-18 17:18 UTC (permalink / raw)
To: lartc
Maybe this is just for Stef?
In answering Miernik's question (which Stef already answered), I read
this:
http://www.docum.org/stef.coene/qos/faq/cache/13.html
I thought it didn't matter what the rate was in a parent class? I thought
that it only mattered what the ceil was in a parent class. I'm doubting
myself now that I read this FAQ answer.
My understanding:
The parent class is only consulted by the child class when the child
class has exceeded its rate and wants to borrow from the parent. So,
the parent class rate is not consulted, but the ceil is used to
determine whether or not to lend?
Is my understanding wrong?
What's the story!?
-Martin
--
Martin A. Brown --- SecurePipe, Inc. --- mabrown@securepipe.com
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: [LARTC] HTB: why should "sum (rate of children) <= parent rate"?
2003-05-18 17:18 [LARTC] HTB: why should "sum (rate of children) <= parent rate"? Martin A. Brown
@ 2003-05-18 18:13 ` Stef Coene
0 siblings, 0 replies; 2+ messages in thread
From: Stef Coene @ 2003-05-18 18:13 UTC (permalink / raw)
To: lartc
On Sunday 18 May 2003 19:18, Martin A. Brown wrote:
> Maybe this is just for Stef?
>
> In answering Miernik's question (which Stef already answered), I read
> this:
>
> http://www.docum.org/stef.coene/qos/faq/cache/13.html
>
> I thought it didn't matter what the rate was in a parent class? I thought
> that it only mattered what the ceil was in a parent class. I'm doubting
> myself now that I read this FAQ answer.
>
> My understanding:
>
> The parent class is only consulted by the child class when the child
> class has exceeded its rate and wants to borrow from the parent. So,
> the parent class rate is not consulted, but the ceil is used to
> determine whether or not to lend?
>
> Is my understanding wrong?
>
> What's the story!?
Take this example :
tc class add dev eth0 classid 1:1 parent 1:0 htb rate 200kbps ceil 50kbps
tc class add dev eth0 classid 1:10 parent 1:1 htb rate 150kbps ceil 128kbps
tc class add dev eth0 classid 1:20 parent 1:1 htb rate 150kbps ceil 128kbps
Both classes will get 150kbps. So no parent ceil/rate is checked/respected.
I also did some tests to find out how the parent rate is used to split the
traffic to child classes. Example :
tc class add dev eth0 classid 1:1 parent 1:0 htb rate 200kbps
tc class add dev eth0 classid 1:10 parent 1:1 htb rate 150kbps ceil 200kbps
tc class add dev eth0 classid 1:20 parent 1:1 htb rate 50kbps ceil 200kbps
tc class add dev eth0 classid 1:100 parent 1:10 htb rate 50kbps ceil 200kbps
tc class add dev eth0 classid 1:200 parent 1:20 htb rate 50kbps ceil 200kbps
And this results is 75% for class 1:10.
But
tc class add dev eth0 classid 1:1 parent 1:0 htb rate 200kbps
tc class add dev eth0 classid 1:10 parent 1:1 htb rate 150kbps ceil 200kbps
tc class add dev eth0 classid 1:20 parent 1:1 htb rate 50kbps ceil 200kbps
tc class add dev eth0 classid 1:100 parent 1:10 htb rate 80kbps ceil 200kbps
tc class add dev eth0 classid 1:200 parent 1:20 htb rate 80kbps ceil 200kbps
gives 65% to class 1:100.
So it's not clear to me how the rate of the parent is used in the
calculations. It is, but I don't know how.
For the ceil :
tc class add dev eth0 classid 1:1 parent 1:0 htb rate 100kbps
tc class add dev eth0 classid 1:10 parent 1:1 htb rate 150kbps ceil 100kbps
tc class add dev eth0 classid 1:20 parent 1:1 htb rate 50kbps ceil 100kbps
tc class add dev eth0 classid 1:100 parent 1:10 htb rate 20kbps ceil 200kbps
tc class add dev eth0 classid 1:200 parent 1:20 htb rate 20kbps ceil 200kbps
Total bandwidth is 200kbps. So the 100kbps ceil is never respected.
Stef
--
stef.coene@docum.org
"Using Linux as bandwidth manager"
http://www.docum.org/
#lartc @ irc.oftc.net
_______________________________________________
LARTC mailing list / LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2003-05-18 18:13 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2003-05-18 17:18 [LARTC] HTB: why should "sum (rate of children) <= parent rate"? Martin A. Brown
2003-05-18 18:13 ` Stef Coene
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox