RE: tcng version 8y

Linux Advanced Routing and Traffic Control

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

 



> 
> Message: 4
> Date: Sat, 21 Sep 2002 00:39:59 -0300
> From: Werner Almesberger <wa@almesberger.net>
> To: lartc@mailman.ds9a.nl
> Subject:  tcng version 8y
> 
> ... is on SourceForge, http://tcng.sourceforge.net/#src
> 
> The main changes are that tcng's HTB is now better at quantum
> handling, and that tcsim now includes packet.def and ports.tc
> automatically (via the new default.tcsim), like tcc uses
> default.tc. The full change log is below, as usual.

> 
> The HTB change adds a very natural way for expressing a quantum:
> instead of the somewhat obscure r2q, 

I think this statement requires a little more explanation.

> the quantum can be specified
> as the time during which the class may monopolize the link.
> 
> The following two examples are equivalent:
> 
> htb {
>     class (rate 1Mbps,quantum 1250B);
> }
> 
> htb {
>     class (rate 1Mbps,quantum 10ms);
> }
> 

According to 
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm
======================
It might be good time to touch concept of quantums now. In fact when more classes want to borrow bandwidth they are each given some number of bytes before serving other competing class. This number is called quantum. You should see that if several classes are competing for parent's bandwidth then they get it in proportion of their quantums. It is important to know that for precise operation quantums need to be as small as possible and larger than MTU. 
Normaly you don't need to specify quantums manualy as HTB chooses precomputed values. It computes classe's quantum (when you add or change it) as its rate divided by r2q global parameter. Its default value is 10 and because typical MTU is 1500 the default is good for rates from 15 kBps (120 kbit). For smaller minimal rates specify r2q 1 when creating qdisc - it is good from 12 kbit which should be enough. If you will need you can specify quantum manualy when adding or changing the class. You can avoid warnings in log if precomputed value would be bad. When you specify quantum on command line the r2q is ignored for that class. 
======================


This is how tcng replaces a global parameter r2q with quantums :

Tcc allows inheritance of paramers so the following 

 htb  (quantum 1250B) {
     class (rate 1Mbps);
     class (rate 2Mbps);
 }

will have the same effect as:

 htb  () {
     class (rate 1Mbps, quantum 1250B);
     class (rate 2Mbps, quantum 1250B);
 }

So, in a way every parameter is "global".

If time is specified instead of bytes:

 htb  (quantum 10ms) {
     class (rate 1Mbps);
     class (rate 2Mbps);
 }

tcc will calculate the  quantum for each class based  it's rate 
and it's  time quantum inherited from the "global" time quantum.


- Jacob
_______________________________________________
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