[LARTC] How HTB treats priorities?

Linux Advanced Routing and Traffic Control

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

 



On Saturday 04 January 2003 21:21, ISC Robert Krycza=B3o wrote:
> Hello Stef,
Hi,

I have 1 big remark.  You results are incorrect and not usable.  The quan=
tum=20
of your class is too low.  You have a rate of 1kbit, so quantum is 1kbit =
/ 10=20
=3D 100 bit.  In your case, quantum is important.  Each class may send qu=
antum=20
bytes to use all remaining bandwidth from the parent.  Let's say class 21=
 and=20
22 are fighting for bandwidth.  The qauntums are 400 and 300.  So class 2=
1=20
may send 400bit and after that class 22 may send 300bit.  But most packet=
s=20
are 1500byte !!!   So 1500 byte is sended.  So the internal calulations o=
f=20
htb are totally fucked up (sorry for the language :).

If you want to get some good results, use at minimum a rate of 15kbit or=20
change the r2q parameter.  If you are curious about the qauntum parameter=
, I=20
have some more info on www.docum.org on the faq page.

I redid some of your test with higher rates.  I multiplied the rates with=
 16=20
(so kbit -> kpbs and x2).  And I added r2q =3D 1 so lowest quantum is=20
2000bytes.

And I toke a wrong conclusion.  The parent ceil is not respected IF the s=
um of=20
the rates of childs exceed the parent ceil.  So if you have 2 childs clas=
ses=20
with rate =3D 100 and a parent ceil of 100, the parent ceil is not respec=
ted=20
and the childs will get each 100.  But if you have 2 class with rate =3D =
2 and=20
parent ceil =3D 100, then the childs to gether will never get more then 1=
00. =20
So the parent ceil is respected.

Traffic in class 21 : 127.5 KB/s
Traffic in class 22 : 256.1 KB/s
Traffic in class 21 and 22 : 120.4 KB/s and 137.7 KB/s
=09so the parent ceil is respected.  But I still don't know how the traff=
ic is=20
divided.  The sum is 258.1 so class 21 gets 46.6%.  I think each class ge=
ts=20
the configured rate and the remaining traffic is splitted 50-50.

> During the tests I discovered that in case of root class (1:0 in my
> example) only rate matters not ceil. I accidentally changed 1:2 and 1:3=
 to
> root classes and then 22,23,24 were limited to 8kbit/s.
I did the same.  And indeed.  For a root class, ceil =3D rate even if you=
=20
specify a higher ceil.  Strange.  On the other hand, it's logic to create=
 1=20
root class that holds all traffic so it has rate =3D ceil.  It's the=20
"bottleneck" within the htb structure.

Stef

--=20

stef.coene@docum.org
 "Using Linux as bandwidth manager"
     http://www.docum.org/
     #lartc @ irc.oftc.net



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