From: Lee Sanders Date: Thu, 20 Oct 2005 14:32:39 +0000 Subject: Re: [LARTC] Consider r2q change Message-Id: <200510202232.39935.lartc-337@ccp.com.au> List-Id: References: <001801c5d580$46ec2b20$0700000a@d3lta> In-Reply-To: <001801c5d580$46ec2b20$0700000a@d3lta> MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable To: lartc@vger.kernel.org You really should search the list archives. This question has been asked a = dozen times in the last year. Google also turned this up quite quickly. http://www.docum.org/docum.org/faq/cache/31.html To copy and paste some previous answers from the list. You will need to sor= t=20 these yourself. It is documented in HTB manual. The complaint was not displayed before and sharing was silently wrong. Quantum of leaf should be between 1500 and 60000 and it is computed as rate/r2q (or can be supplied independly). So that if your maximal leaf rate is 1Mbit (120000Bps) then r2q should be 3. If max rate is 10kbit (1200Bps) then r2q should be 1. It is warning only and will not affect functionality, only precision. devik Smallest rate : 16kbit =3D 2 kilobyt / r2q (=10) =3D 200. =A0And this is < = 1500. =A0So=20 you get warnings. Biggest rate : 100mbit =3D 12.5 mbyte / r2q =3D 1.2 Mbyte > 60.000. =A0So y= ou get=20 warnings. =A0 If you do tc qdisc add dev eth0 root handle 1: htb default 10 r2q 1 Smallest rate : 16kbit =3D 2kilobyte / r2k =3D 2000. =A0And this is > 1500.= =A0So no=20 warnings. Biggest rate : 100mbit =3D 12.5 mbyte / r2q =3D 12.5 Mbyte > 60.000. =A0So = you get=20 warnings. =A0But you can overrule the quantum : tc class add dev eth0 parent 1:1 classid 1:11 htb rate 128kbit burst 2k=20 quantum 60000 Quantum is used when 2 classes are getting more bandwidth then the rate. = =A0 So=20 it's only important for sharing the remaining bandwidth. =A0In that case, e= ach=20 class may send quantum bytes. If I understand the source, that message occours when you have a leaf=20 class whose calculated quantum (rate/r2q) is less than 1000 byte and the=20 kernel set the quantum to 1000 byte. I've read that the quantum should be bigger than the MTU so I don't=20 understand why the kernel don't use a minimum quantum value bigger than=20 1500. Someone has a clue? =A0From kernel-source-2.6.10/net/sched/sch_htb.c if (!hopt->quantum && cl->un.leaf.quantum < 1000) { =A0 =A0 printk(KERN_WARNING "HTB: quantum of class %X is small. Consider r2= q=20 change.\n", cl->classid); =A0 =A0 cl->un.leaf.quantum =3D 1000; I hope this helps. Regards, Lee On Thu, 20 Oct 2005 10:12 pm, James Lista wrote: > nsider r2q change. > HTB: quantum of class 10002 is big. Consider r2q change. > HTB: quantum of class 10030 is small. Consider r2q change. > HTB: quantum of class 10031 is small. Consider r2q change. _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc