Linux Advanced Routing and Traffic Control list
 help / color / mirror / Atom feed
From: Stef Coene <stef.coene@docum.org>
To: lartc@vger.kernel.org
Subject: Re: [LARTC] HTB: why should "sum (rate of children) <= parent rate"?
Date: Sun, 18 May 2003 18:13:39 +0000	[thread overview]
Message-ID: <marc-lartc-105328181320319@msgid-missing> (raw)
In-Reply-To: <marc-lartc-105327838417907@msgid-missing>

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/

      reply	other threads:[~2003-05-18 18:13 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
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 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=marc-lartc-105328181320319@msgid-missing \
    --to=stef.coene@docum.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox