From mboxrd@z Thu Jan 1 00:00:00 1970 From: Stef Coene Date: Sun, 05 Jan 2003 17:42:07 +0000 Subject: Re: [LARTC] How HTB treats priorities? Message-Id: List-Id: References: In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org 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 quantu= m=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 quan= tum=20 bytes to use all remaining bandwidth from the parent. Let's say class 21 a= nd=20 22 are fighting for bandwidth. The qauntums are 400 and 300. So class 21 = may send 400bit and after that class 22 may send 300bit. But most packets = are 1500byte !!! So 1500 byte is sended. So the internal calulations of = 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 1= 6=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 sum= of=20 the rates of childs exceed the parent ceil. So if you have 2 childs classe= s=20 with rate =3D 100 and a parent ceil of 100, the parent ceil is not respecte= d=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 100= . =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 so the parent ceil is respected. But I still don't know how the traffic i= s=20 divided. The sum is 258.1 so class 21 gets 46.6%. I think each class gets= =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 _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/