Re: various questions about tc & htb

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Thursday 28 November 2002 14:40, Abraham van der Merwe wrote:
> Hi!
>
> HTB questions:
>
> 1. why is quantum not always: quantum=mtu?
>
> From http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm:
>
> ------------< snip <------< snip <------< snip <------------
> It is important to know that for precise operation quantums need to be as
> small as possible and larger than MTU
> ------------< snip <------< snip <------< snip <------------
>
> Why isn't quantum just set to MTU then? Is there any advantages to having a
> bigger quantum?
First you need the know why quantum exists.  You can find more info on 
www.docum.org on the faq page.  BAsically, quantum is used when 2 or more 
classes are asking for extra (so more then the rate) bandwidth from the same 
parent.  Then they may send "quantum" bytes at each turn.  

> 2. why is mtu not just derived from the interface (you always have to
> specify the interface, so tc can just do a SIOCGIFMTU on the interface to
> get the MTU size)?
When do you have to specify mtu if you use htb ??

> 3. what is the difference between the priority which you can specify on the
> leaf nodes of the classes and the priorities you can specify in u32 match
> filters? does the one override the other? it seems that you have to specify
> the priority in a u32 match (to avoid the double display bug), so can you
> just specify prio 1 in all the u32 filters and then prioritize using
> classes - will that work or will the u32 priorities override the others?
Prio in filters is used to know the order the filters are checked.  So filters 
with the same parent are ordered based on the prio setting.
Prio in htb classes is used to give a) one class the first choice in excess 
bandwidth and b) to give the class lower delays.

> 4. could somebody please explain exactly what happens if the
> rates of children/subclasses within a root class exceed that of the root
> class/parent? does that influence other classes/qdiscs that does not fall
> within that hierarchy? (e.g. two classes 1:10 and 1:20 each have some
> classes below them - class 1:10 have more children in it than its rate, but
> 1:20 has less children / rate than its own rate - does the "oversold" rates
> in 1:10 influence 1:20?)
Nothing will happen.  All the traffic from class 1:10 is considered as 1 data 
stream for the parent of 1:10.  The same for class 1:20.  So splitting the 
data between 1:10 and 1:20 has nothing to do with the child classes they may 
have.

> 5. what happens if none of the rates of each class in a parent class exceed
> the parent's rate/ceil, but the total (i.e. sum of all the rates of the
> child classes) does exceed the parent's rate/ceil?
Then the parent will throttle the bandwidth to it's rate.  Again, the traffic 
of all the child classes is considered as one 1 data stream for the parent 
class.

> 6. lets say I have a line with a certain rate - e.g. 512kbit, but I know
> for a fact that I can get a higher throughput through this line, lets say
> 768kbit. Now if I add a root qdisc with a root class in it rated at 512kbit
> and then add another child class in it with rate 512kbit and ceil 768kbit
> and then all my classes within that class - will the subclasses still
> respect their rate/ceil's?
The parent ceil is never respected due to performance problems.  Doing so will 
create a lot of overhead.  So the ceil of the child class can never be higher 
then the ceil of the parent.  Of course you can take a higher value, but the 
ceil of the parent class will not be respected.

> TC questions:
>
> 1. how does the classid's work? I must be stupid or something, but I just
> can't figure out how you're supposed to represent a hierarchy of classes
> with classid's.
>
> The way I understand it classid = <major>:<minor> and all the <major>
> numbers of classes within a qdisc must be the same as the qdisc (which have
> <minor> = 0), i.e.
x:0 can also be a class, but a qdisc is always x:0.  For htb, class x:0 is a 
pass-thru class that will send the packets as fast as possible.

> tc qdisc ... handle <x>: ...
>
> # root class in this qdisc
> tc class ... parent <x>: classid <x>:<y>
>
> tc class ... parent <x>:<y> classid <x>:<z>
>
>
> So the qdisc handle is easy (just choose a unique major number), the root
> class in the qdisc is easy (just choose a unique minor number), but what do
> you use for the classes within the root class if you want multiple levels
> of classes, e.g.
>
> qdisc
>
>   +-- root class
>         +-- class 1
>         |     +-- class 1.1
>         |     +-- class 1.2
>         +-- class 2
>               +-- class 2.1
>
> in above diagram, what would the classid's of classes 1, 2, 1.x, and 2.x
> be?
Choose what ever number you want as long as the minor number is unique within 
the qdisc.

> 2. what happens if you have multiple root qdiscs?
>
> e.g.
>
> tc qdisc ... handle 1: root htb ...
> tc qdisc ... handle 2: root htb ...
>
> with some classes in each. Does the first qdisc get evaluated first, then
> the second or what?
You can only have 1 root qdisc.  The root qdisc controls the queue of the 
outgoing packets and there is only 1 queue.

> 3. what happens if you have qdiscs in non-leaf nodes within classes?
It depends.  Most of the time it will only generate extra overhead and it will 
eat CPU cycles.

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/


[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux