Hi there! I''ve using HTB for a while and now I an faced with a ''problem''. How hierarchical is HTB? Let''s say I have this 3 layer HTB setup: root class 1: (rate=100, ceil=100) 1: children classes 1:10 (30,100) and 1:20 (70,100) 1:10 children classes 1:100 (10,100) and 1:101 (20,100) 1:20 children classes 1:200 (30,100) and 1:201 (70,100) I managed to have the root rate equals to the sum of its children. But how must the rates of the leaves be signed? And how the bandwidth of these leaves will be distributed when borrowing/lending is necessary? classs 1:10 will/may lend/borrow from class 1:20. I know that. But how about 1:1XX and classes 1:2XX? will the borrow/lend from each others? Any docs about this? Thanx Ethy
> root class 1: (rate=100, ceil=100) > 1: children classes 1:10 (30,100) and 1:20 (70,100) > 1:10 children classes 1:100 (10,100) and 1:101 (20,100) > 1:20 children classes 1:200 (30,100) and 1:201 (70,100) > > I managed to have the root rate equals to the sum of its children. > >Well, it is still true that total assured rate for classes 1:200 and 1:201 is greater than assured rate for class 1:20. Still, I don''t think this is a big deal.> But how must the rates of the leaves be signed? >What do you mean with ''signed''?> And how the bandwidth of these leaves will be distributed when > borrowing/lending is necessary? > >As far as I know, when a leaf is ''yellow'', i.e. its rate is greater than its assured rate and lesser than its ceil rate, it can borrow from its parent providing there''s a yellow-path to the root and the root is green (root can''t be yellow, only green or red). If there''s more than one child borrowing from the same class, they''re served according to their priority (argument prio in *tc class add*). If there''s more than one child having the same priority, then they''re served in DRR order (Deficit Round Robin). You can tune DRR behaviour with arguments r2q in *tc qdisc add* and quantum in *tc class add*.> classs 1:10 will/may lend/borrow from class 1:20. I know that. >No it can not. A class can only borrow from its parent, never from its siblings.> But how about 1:1XX and classes 1:2XX? will the borrow/lend from each > others? > >ibidem.> Any docs about this? > >You may see: http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm
On Wed, 06 Jun 2007 16:58:14 +0200 Claudio Greco <cla.greco@fastwebnet.it> wrote:> > > root class 1: (rate=100, ceil=100) > > 1: children classes 1:10 (30,100) and 1:20 (70,100) > > 1:10 children classes 1:100 (10,100) and 1:101 (20,100) > > 1:20 children classes 1:200 (30,100) and 1:201 (70,100) > > > > I managed to have the root rate equals to the sum of its children. > > > > > Well, it is still true that total assured rate for classes 1:200 and > 1:201 is greater than assured rate for class 1:20. Still, I don''t think > this is a big deal.My mistake. I meant 1:20 (40,100) and not (70,100).> > > But how must the rates of the leaves be signed? > > > What do you mean with ''signed''?Again!? Please read "assigned"> > > And how the bandwidth of these leaves will be distributed when > > borrowing/lending is necessary? > > > > > As far as I know, when a leaf is ''yellow'', i.e. its rate is greater than > its assured rate and lesser than its ceil rate, it can borrow from its > parent providing there''s a yellow-path to the root and the root is green > (root can''t be yellow, only green or red).Ok. Then class 1:200 may "borrow" from 1:100 via the path to root class.> > If there''s more than one child borrowing from the same class, they''re > served according to their priority (argument prio in *tc class add*). > > If there''s more than one child having the same priority, then they''re > served in DRR order (Deficit Round Robin).So will the available BW at root class be assigned to 200 and 100 proportionally to its rate (different amounts) or they both (100 and 200) grow by the same amount up to its own ceil? (confuse?)> > You can tune DRR behaviour with arguments r2q in *tc qdisc add* and > quantum in *tc class add*.I will research about that.> > Any docs about this? > > > > > You may see: > > http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm > http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htmI found then. Thanx Ethy
Few quick comments: HTB parent rate should never be less than the sum of its children. This is referring to the rate parameter not the ceil. Class 1:20 needs to equal 1:200+1:201. You will get strange results if you try and test with any configuration where the the sum of all childeren rates are greater than their parent. Borrowing occurs from the parent and from classes at the same level. So if you have 3 leaf classes. 1:1, 1:2, and 1:3 they will get their assigned rate and borrow up their ceil if there is extra bandwidth. If there is no traffic in one of the classes then it can give its assured bandwidth to the other 2 classes with traffic. Borrowing is based on the priority assigned to the class. Jon Flechsenhaar Boeing WNW Team Network Services (714)-762-1231 202-E7 -----Original Message----- From: Claudio Greco [mailto:cla.greco@fastwebnet.it] Sent: Wednesday, June 06, 2007 7:58 AM To: Ethy H. Brito Cc: lartc@mailman.ds9a.nl Subject: Re: [LARTC] how hierarchical is HTB?> root class 1: (rate=100, ceil=100) > 1: children classes 1:10 (30,100) and 1:20 (70,100) 1:10 children > classes 1:100 (10,100) and 1:101 (20,100) 1:20 children classes 1:200 > (30,100) and 1:201 (70,100) > > I managed to have the root rate equals to the sum of its children. > >Well, it is still true that total assured rate for classes 1:200 and 1:201 is greater than assured rate for class 1:20. Still, I don''t think this is a big deal.> But how must the rates of the leaves be signed? >What do you mean with ''signed''?> And how the bandwidth of these leaves will be distributed when > borrowing/lending is necessary? > >As far as I know, when a leaf is ''yellow'', i.e. its rate is greater than its assured rate and lesser than its ceil rate, it can borrow from its parent providing there''s a yellow-path to the root and the root is green (root can''t be yellow, only green or red). If there''s more than one child borrowing from the same class, they''re served according to their priority (argument prio in *tc class add*). If there''s more than one child having the same priority, then they''re served in DRR order (Deficit Round Robin). You can tune DRR behaviour with arguments r2q in *tc qdisc add* and quantum in *tc class add*.> classs 1:10 will/may lend/borrow from class 1:20. I know that. >No it can not. A class can only borrow from its parent, never from its siblings.> But how about 1:1XX and classes 1:2XX? will the borrow/lend from each > others? > >ibidem.> Any docs about this? > >You may see: http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm _______________________________________________ LARTC mailing list LARTC@mailman.ds9a.nl http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
What exactly happens if the sum of the children classes rate is bigger than the parent''s? What if the majority of these classes are using less than the minimum rate established (eg. 0kbps)? On 6/6/07, Flechsenhaar, Jon J <Jon.J.Flechsenhaar@boeing.com> wrote:> Few quick comments: > > HTB parent rate should never be less than the sum of its children. This > is referring to the rate parameter not the ceil. > > Class 1:20 needs to equal 1:200+1:201. You will get strange results if > you try and test with any configuration where the the sum of all > childeren rates are greater than their parent. > > Borrowing occurs from the parent and from classes at the same level. So > if you have 3 leaf classes. 1:1, 1:2, and 1:3 they will get their > assigned rate and borrow up their ceil if there is extra bandwidth. If > there is no traffic in one of the classes then it can give its assured > bandwidth to the other 2 classes with traffic. Borrowing is based on > the priority assigned to the class. > > Jon Flechsenhaar > Boeing WNW Team > Network Services > (714)-762-1231 > 202-E7 > > -----Original Message----- > From: Claudio Greco [mailto:cla.greco@fastwebnet.it] > Sent: Wednesday, June 06, 2007 7:58 AM > To: Ethy H. Brito > Cc: lartc@mailman.ds9a.nl > Subject: Re: [LARTC] how hierarchical is HTB? > > > > root class 1: (rate=100, ceil=100) > > 1: children classes 1:10 (30,100) and 1:20 (70,100) 1:10 children > > classes 1:100 (10,100) and 1:101 (20,100) 1:20 children classes 1:200 > > (30,100) and 1:201 (70,100) > > > > I managed to have the root rate equals to the sum of its children. > > > > > Well, it is still true that total assured rate for classes 1:200 and > 1:201 is greater than assured rate for class 1:20. Still, I don''t think > this is a big deal. > > > But how must the rates of the leaves be signed? > > > What do you mean with ''signed''? > > > And how the bandwidth of these leaves will be distributed when > > borrowing/lending is necessary? > > > > > As far as I know, when a leaf is ''yellow'', i.e. its rate is greater than > its assured rate and lesser than its ceil rate, it can borrow from its > parent providing there''s a yellow-path to the root and the root is green > (root can''t be yellow, only green or red). > > If there''s more than one child borrowing from the same class, they''re > served according to their priority (argument prio in *tc class add*). > > If there''s more than one child having the same priority, then they''re > served in DRR order (Deficit Round Robin). > > You can tune DRR behaviour with arguments r2q in *tc qdisc add* and > quantum in *tc class add*. > > > classs 1:10 will/may lend/borrow from class 1:20. I know that. > > > No it can not. A class can only borrow from its parent, never from its > siblings. > > > But how about 1:1XX and classes 1:2XX? will the borrow/lend from each > > others? > > > > > ibidem. > > > Any docs about this? > > > > > You may see: > > http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm > http://luxik.cdi.cz/~devik/qos/htb/manual/theory.htm > > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc > _______________________________________________ > LARTC mailing list > LARTC@mailman.ds9a.nl > http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc >-- Marco Casaroli SapucaiNet Telecom +55 35 34712377 ext 5