Amit Kucheria
2002-Aug-16 21:09 UTC
HTB equivalent for ''bounded'' and ''isolated'' in CBQ
Hi all, Sally Floyd''s Link sharing paper defines the following: 1. Bounded class: class that is not allowed to borrow from ancestor classes, regardless of the limit status of those classes. 2. Isolated class: class that does not allow non-descendant classes to borrow its unused bandwidth and that does not borrow bandwidth from other classes in turn How does HTB implement a ''bounded class''? I seem to see no constructs to be able to do this. The ''ceil'' parameter allows us to implement a part of the ''isolated'' definition above. By setting it equal to ''rate'', the class does not borrow bandwidth, but what will stop other classes from borrowing its unused bandwidth? Regards, Amit -- I''m an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ____________________________________________________ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene
2002-Aug-18 20:01 UTC
Re: HTB equivalent for ''bounded'' and ''isolated'' in CBQ
On Friday 16 August 2002 23:09, Amit Kucheria wrote:> Hi all, > > Sally Floyd''s Link sharing paper defines the following: > > 1. Bounded class: class that is not allowed to borrow from ancestor > classes, regardless of the limit status of those classes. > > 2. Isolated class: class that does not allow non-descendant classes to > borrow its unused bandwidth and that does not borrow bandwidth from > other classes in turn > How does HTB implement a ''bounded class''? I seem to see no constructs to > be able to do this.You can use the ceil parameter to bound a class to a certain rate. With rate = ceil, you will get the same result as the bounded option in cbq.> The ''ceil'' parameter allows us to implement a part of the ''isolated'' > definition above. By setting it equal to ''rate'', the class does not > borrow bandwidth, but what will stop other classes from borrowing its > unused bandwidth?Providing no ceil parameter means rate = ceil. But this can not be used to implement isolated like in cbq. Rate = ceil means the class can not use more bandwidth then it''s rate. Isolated in cbq means other classes can not borrow bandwidth from the class and that''s not the same. There is no way you can implement isolated with htb. But with htb you can do something like this : Total : 100 class1 rate 20 ceil 20 class2 rate 40 ceil 80 class3 rate 40 ceil 80 class 1 is isolated like in cbq. It can not use more then it''s rate/ceil and class2 and class3 will never use bandwidth from class1, only from each other. Just like the definition of isolated :) Stef Btw, I never could get isolated working with cbq. -- 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/
Amit Kucheria
2002-Aug-21 03:32 UTC
Re: HTB equivalent for ''bounded'' and ''isolated'' in CBQ
On Fri, 16 Aug 2002, Stef Coene wrote:>> The ''ceil'' parameter allows us to implement a part of the ''isolated'' >> definition above. By setting it equal to ''rate'', the class does not >> borrow bandwidth, but what will stop other classes from borrowing its >> unused bandwidth? > > Providing no ceil parameter means rate = ceil. But this can not be > used to implement isolated like in cbq. Rate = ceil means the class > can not use more bandwidth then it''s rate. Isolated in cbq means other > classes can not borrow bandwidth from the class and that''s not the > same. There is no way you can implement isolated with htb. > > But with htb you can do something like this : > > Total : 100 > class1 rate 20 ceil 20 > class2 rate 40 ceil 80 > class3 rate 40 ceil 80 > > class 1 is isolated like in cbq. It can not use more then it''s > rate/ceil and class2 and class3 will never use bandwidth from class1, > only from each other. Just like the definition of isolated :)What happens when there is no traffic in class 1? Will class 2 and 3 share class 1''s bandwidth then? The reason I am asking these questions is because I am trying to see if HTB can be used in place of CBQ in Diffserv. Has anybody tried something like this? Regards, Amit -- I''m an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ____________________________________________________ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene
2002-Aug-21 17:48 UTC
Re: HTB equivalent for ''bounded'' and ''isolated'' in CBQ
> > Total : 100 > > class1 rate 20 ceil 20 > > class2 rate 40 ceil 80 > > class3 rate 40 ceil 80 > > > > class 1 is isolated like in cbq. It can not use more then it''s > > rate/ceil and class2 and class3 will never use bandwidth from class1, > > only from each other. Just like the definition of isolated :) > > What happens when there is no traffic in class 1? Will class 2 and 3 > share class 1''s bandwidth then?No traffic in class 1 means that class2 and class3 will share the same bandwidth, but only 80 as maximum. So the bandwidth of class1 (20) is isolated like you can set with cbq. Htb is straight forward. Each class will get''s his rate as a minimum. The remaining bandwidth is devided according to the rate (and lowest priority gets first choice) and this with a maximum of the ceil.> The reason I am asking these questions is because I am trying to see if > HTB can be used in place of CBQ in Diffserv. Has anybody tried something > like this?I didn''t tried, but I think htb will do fine (or even better). Stef -- 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/
I am trying to reproduce Stef''s CBQ tests from www.docum.org My setup is very simple : testbed43 --------> testbed44 -------> testbed45 (src) (CBQ) (sink) 192.168.10.2 in: 192.168.10.254 192.168.100.2 out: 192.168.100.254 I have 2 isolated classes (2:2 and 2:3) which need to share the bandwidth. I have only one traffic source at the moment whose traffic is sent into 2:2, but *doesnot* get limited to the rate specified in 2:2. Any clues would be welcome. TIA. ciao, Amit p.s. Stef - You ''tests'' page is down. The script follows: ----------------------------------------------------------------- #!/bin/sh -x # Script to see the working of bounded and isolated TC="/usr/bin/tc" DEV="dev eth1" AVPKT="avpkt 1514" BW="bandwidth 10Mbit" MAXBURST="maxburst 200" MPU="mpu 64" CELL="cell 8" ALLOT="allot 1514" #RATE1="rate 6Mbit weight 600Kbit" #RATE2="rate 4Mbit weight 400Kbit" RATE1="rate 150Kbit weight 150Kbit" RATE2="rate 200Kbit weight 200Kbit" # Root qdisc (10 Mbit) $TC qdisc add $DEV root handle 1:0 cbq $BW $AVPKT $CELL # Root class (10Mbit) $TC class add $DEV parent 1:0 classid 1:1 cbq $BW $CELL \ prio 3 rate 10Mbit $ALLOT $MAXBURST $AVPKT \ bounded # Enclosing qdisc (10 Mbit) $TC qdisc add $DEV parent 1:1 handle 2:0 cbq $BW $AVPKT $CELL # Enclosing class (10 Mbit) $TC class add $DEV parent 2:0 classid 2:1 cbq $BW $CELL \ prio 3 rate 10Mbit $ALLOT $MAXBURST $AVPKT # Real-time class (6Mbit) $TC class add $DEV parent 2:1 classid 2:2 cbq $BW $CELL \ prio 3 $RATE1 $ALLOT $MAXBURST $AVPKT \ isolated # Best-effort class (4Mbit) $TC class add $DEV parent 2:1 classid 2:3 cbq $BW $CELL \ prio 3 $RATE2 $ALLOT $MAXBURST $AVPKT \ isolated # Dummy filter (qdisc 1:0 to class 1:1) $TC filter add $DEV parent 1:0 protocol ip prio 2 u32 match ip tos 0x00 0x00 flowid 1:1 # RSVP filter to send RT traffic from 2:0 to 2:2 $TC filter add $DEV parent 2:0 protocol ip prio 2 rsvp \ ipproto udp session 192.168.100.2/9001 flowid 2:2 ----------------------------------------------------------------- -- I''m an angel!!! Honest! The horns are just there to hold the halo up straight. ^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^-^ Amit Kucheria EECS Grad. Research Assistant University of Kansas @ Lawrence (R): +1-785-830-8521 ||| (C): +1-785-760-2871 ____________________________________________________ _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Radosław Łoboda
2002-Aug-29 06:26 UTC
Re: HTB equivalent for ''bounded'' and ''isolated'' in CBQ
On Tue, 20 Aug 2002, Amit Kucheria wrote:> On Fri, 16 Aug 2002, Stef Coene wrote: > > >> The ''ceil'' parameter allows us to implement a part of the ''isolated'' > >> definition above. By setting it equal to ''rate'', the class does not > >> borrow bandwidth, but what will stop other classes from borrowing its > >> unused bandwidth? > > > > Providing no ceil parameter means rate = ceil. But this can not be > > used to implement isolated like in cbq. Rate = ceil means the class > > can not use more bandwidth then it''s rate. Isolated in cbq means other > > classes can not borrow bandwidth from the class and that''s not the > > same. There is no way you can implement isolated with htb. > > > > But with htb you can do something like this : > > > > Total : 100 > > class1 rate 20 ceil 20 > > class2 rate 40 ceil 80 > > class3 rate 40 ceil 80 > > > > class 1 is isolated like in cbq. It can not use more then it''s > > rate/ceil and class2 and class3 will never use bandwidth from class1, > > only from each other. Just like the definition of isolated :) > > What happens when there is no traffic in class 1? Will class 2 and 3 > share class 1''s bandwidth then? > > The reason I am asking these questions is because I am trying to see if > HTB can be used in place of CBQ in Diffserv. Has anybody tried something > like this?It works fine for me, although I haven''t used CBQ previously so I can''t comapre them. It just works for me, except the delays in interactive class are too long, even when the prio is 0 (highest) and the rate and ceil are maximum. Maybe CBQ is better in reducing the delays... Anybody solved this problem? -- ########################################## # | p0wer | # # __ | GG#1877248 | # # (oo) | p0wer@bojko.eu.org | # # / \/ \ Go away or I will replace you # # `V__V'' with a very small shell script. # ########################################## _______________________________________________ LARTC mailing list / LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Stef Coene
2002-Aug-29 13:08 UTC
Re: HTB equivalent for ''bounded'' and ''isolated'' in CBQ
> It works fine for me, although I haven''t used CBQ previously so I can''t > comapre them. It just works for me, except the delays in interactive class > are too long, even when the prio is 0 (highest) and the rate and ceil are > maximum. Maybe CBQ is better in reducing the delays... Anybody solved this > problem?There is a way with htb to get really low delays. It can be found on the htb homepage (http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#prio, last paragraph). Basically, you have 2 classes : on rated to xx% of the link and an other rated to 100-X%. If you make sure you NEVER send more data to the 100-xx% class so it never has to ask for more bandwidth, it will have very low delays. If you send more data, the situation is reversed and that class will get very high delays. I still have to test it, but you can use the policer in the filters to make sure you never send more data then the rate of the class. Stef -- 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/