>Hi everyone, and thanks for your help so far. > >I have been playing around with tc and htb for a couple of weeks now, and >while I am nowhere near understanding everything here, I am beginning to >know more about packets than I ever wanted to know. > >I have two university buildings with a 1mb connection to the Internet. The >two buildings (on either side of town) are connected through a tunnel >using their internet connection, so that the administration can use the >database across town. They have to share the connection with all the >students on both sides, and the traffic the teachers create. So the people >in admin have a hard time connecting to their database. > >What I have done so far is to create two leaves 1:10 and 1:20 and filtered >the traffic going to the database on the far end. What the admin there >would like is, that the connection is fully available for everyone, until >the secretary wants to look something up on the database. Then it should >have top prority and all the other traffic should virtually stop. > >I managed to apply the filters and have the packets ending up in the right >leaf. But the results are far from satisfactory. > >#!/bin/bash >tc qdisc add dev eth1 root handle 1: htb default 30 >tc class add dev eth1 parent 1: classid 1:1 htb rate 96mbit burst 15k >tc class add dev eth1 parent 1: classid 1:7 htb rate 128kbps burst 15k >tc class add dev eth1 parent 1:1 classid 1:10 htb rate 96mbit burst 15k >tc class add dev eth1 parent 1:7 classid 1:20 htb rate 127kbps ceil 128kbps > burst 15k prio 0 >tc class add dev eth1 parent 1:7 classid 1:30 htb rate 1kbps ceil 128kbps > burst 1k prio 2 >tc qdisc add dev eth1 parent 1:10 handle 10: sfq perturb 10 >tc qdisc add dev eth1 parent 1:20 handle 20: sfq perturb 10 >tc qdisc add dev eth1 parent 1:30 handle 30: sfq perturb 10 >U32="tc filter add dev eth1 protocol ip parent 1:0 prio 1 u32" >$U32 match ip src xx.xx.xx.xx/26 flowid 1:10 >$U32 match ip dst 10.190.19.0/28 match ip sport 19813 0xffff flowid 1:20 > >Only if I lower the ceiling on leaf 1:30 does it show any results. If I >have the ceiling the same on both, there is no measureable result in >speed. The both seem to share the connection equally. > >Am I missing the point, is it possible at all, or am I just too dum to get >it right? > >Thanks a lot, > >.peterI have the same problem and unable to solve. According to tc-htb man page, if we set PRIO parameter, then after supplying the packets to satisfy the RATE of all classes, the HTB first sends the available packets to LOWEST PRIO class and so on. In this case if the above class 1:20 with PRIO 0 requests packets, than the class 1:30 must receive only 1kbit (the specified RATE), nothing more. In practice class 1:30 shares the bandwidth with class 1:20 and gets not 1kbit, but much more >20kbit. I have TSL 2.1, kernel 2.4.27-3tr. I changed the PSCHED_CPU and disabled the HTB hysteresis, set SFQ queue length to 16, but the results are the same. Is there something wrong with my understanding? Can anyone explain why PRIO not works? Regards, Zviad _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thu, 2004-10-14 at 02:10, Zviad O. Giorgadze wrote:> According to tc-htb man page, if we set PRIO parameter, then after > supplying the packets to satisfy the RATE of all classes, the HTB > first sends the available packets to LOWEST PRIO class and so on.I think that''s correct> In this case if the above class 1:20 with PRIO 0 requests packets, > than the class 1:30 must receive only 1kbit (the specified RATE), > nothing more.This is true only if that packet is marked to go to the 1:20 chain. It has to _know_ where it''s destined for before it gets priority.> In practice class 1:30 shares the bandwidth with class 1:20 and gets > not 1kbit, but much more >20kbit.This I can''t be certain.> I have TSL 2.1, kernel 2.4.27-3tr. I changed the PSCHED_CPU and > disabled the HTB hysteresis, set SFQ queue length to 16I''m not sure what are those. If anyone can explain that,it wold be nice _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
"Zviad O. Giorgadze" wrote:> > > > >Only if I lower the ceiling on leaf 1:30 does it show any results. If I > >have the ceiling the same on both, there is no measureable result in > >speed. The both seem to share the connection equally. > > > >Am I missing the point, is it possible at all, or am I just too dum to get > >it right? > > > >.peter > > I have the same problem and unable to solve.I can''t promise this is the answer you''re looking for, but it sure helped me a lot. grep "changes from state" /user/src/linux/net/sched/sch_htb.c If you don''t get a match, go to http://luxik.cdi.cz/~devik/qos/htb/ and find the 21.6.2004 patch. gypsy _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Hello gypsy, Thank you for information. This patch solves all my problems. FOR EVERYONE ============HTB borrowing has problems in kernels up to 2.4.27 (not sure about 2.6 series). Apply patch 21.6.2004. http://luxik.cdi.cz/~devik/qos/htb/ Best regards, Zviad ======= At 2004-10-14, 09:28:59 you wrote: ======>"Zviad O. Giorgadze" wrote:>> >> > >> >Only if I lower the ceiling on leaf 1:30 does it show any results. If I >> >have the ceiling the same on both, there is no measureable result in >> >speed. The both seem to share the connection equally. >> > >> >Am I missing the point, is it possible at all, or am I just too dum to get >> >it right? >> > >> >.peter >> >> I have the same problem and unable to solve. > >I can''t promise this is the answer you''re looking for, but it sure >helped me a lot. > >grep "changes from state" /user/src/linux/net/sched/sch_htb.c > >If you don''t get a match, go to >http://luxik.cdi.cz/~devik/qos/htb/ >and find the 21.6.2004 patch. > >gypsy_______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 14 October 2004 06:37, Zviad O. Giorgadze wrote:> Hello gypsy, > > Thank you for information. This patch solves all my problems. > > FOR EVERYONE > ============> HTB borrowing has problems in kernels up to 2.4.27 (not sure about 2.6 > series). Apply patch 21.6.2004.It''s in 2.6.8.1 and beyond, but not in 2.6.7 and below. (I didn''t check 2.6.8.0.) -- Jason Boxman Perl Programmer / *NIX Systems Administrator Shimberg Center for Affordable Housing | University of Florida http://edseek.com/ - Linux and FOSS stuff _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
On Thursday 14 October 2004 05:46, Ow Mun Heng wrote:> > I have TSL 2.1, kernel 2.4.27-3tr. I changed the PSCHED_CPU and > > disabled the HTB hysteresis, set SFQ queue length to 16 > > I''m not sure what are those. If anyone can explain that,it wold be nice- HTB hysteries is an undocumented option and it makes htb faster but les accurate. http://www.docum.org/docum.org/faq/cache/36.html - PSCHED_CPU is the timer used by the kernel: http://www.docum.org/docum.org/faq/cache/40.html - For the queue length: http://www.docum.org/docum.org/faq/cache/21.html Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/