hello, about output of tc -s -d ..... about my setup: all input and output is done on one interface, box recives on it and from it it forwards. very simple, a root 1:1 for output and 1:2 for input classes at 100mbit. and below lots of children with different rates. ceil for children is 1/3 of rate. questions: 1. why do I have "lended" for children classes almost the same as "sent", who do they lend to? the neighboring classes? 2. What is overlimits? is it incremented when certain pkt goest above "rate", what if both "rate" and "ceil"? incremented twice? 3. "dropped"- if the pkt is overlimit it may be dropped right? if it cannot be delayed, right? is this the reason why I have such a difference between them? 4. what is "level", the level in classes tree? I think I am getting it right , but am asking to be shure. -- Anton Yurchenko<phila@dg.net.ua> Digital Generation
On Wednesday 26 June 2002 23:43, Anton Yurchenko wrote:> hello, > > about output of tc -s -d ..... > > about my setup: > all input and output is done on one interface, box recives on it and > from it it forwards. > very simple, a root 1:1 for output and 1:2 for input classes at > 100mbit. and below lots of children with different rates. > ceil for children is 1/3 of rate.So the ceil is smaller then the rate?> questions: > 1. why do I have "lended" for children classes almost the same as > "sent", who do they lend to? the neighboring classes?Yes, to other classes. "lended is # of packets donated by this class (from its rate)"> 2. What is overlimits? is it incremented when certain pkt goest above > "rate", what if both "rate" and "ceil"? incremented twice?overlimits : Packet is not sended due to ceil or rate restrictions So there was to much data in the class. But don''t believe this too much. It depends on how often the qdisc looked for packet.> 3. "dropped"- if the pkt is overlimit it may be dropped right? if it > cannot be delayed, right? is this the reason why I have such a > difference between them?Between what?> 4. what is "level", the level in classes tree?"Level of class determines its position in hierarchy. Leaves has level 0, root classes LEVEL_COUNT-1 and each inner class has level one less than its parent. See pictures below (LEVEL_COUNT=3 there). " I quoted some info from http://luxik.cdi.cz/~devik/qos/htb/ Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
Stef Coene wrote:>On Wednesday 26 June 2002 23:43, Anton Yurchenko wrote: > > >>hello, >> >>about output of tc -s -d ..... >> >>about my setup: >>all input and output is done on one interface, box recives on it and >>from it it forwards. >>very simple, a root 1:1 for output and 1:2 for input classes at >>100mbit. and below lots of children with different rates. >>ceil for children is 1/3 of rate. >> >> >So the ceil is smaller then the rate? > >Sorry mistype. ceil is "rate" + 1/3 rate> > >>questions: >>1. why do I have "lended" for children classes almost the same as >>"sent", who do they lend to? the neighboring classes? >> >> >Yes, to other classes. >"lended is # of packets donated by this class (from its rate)" > >I did some experimenting, and had a root class and just 1 child class, and this child class still had lended pkts to smbody. Who did it lend it to?> > >>2. What is overlimits? is it incremented when certain pkt goest above >>"rate", what if both "rate" and "ceil"? incremented twice? >> >> >overlimits : Packet is not sended due to ceil or rate restrictions So there >was to much data in the class. But don''t believe this too much. It depends >on how often the qdisc looked for packet. > >What does "looked" mean? could you pleases explain it a bit more? How does it look for a pkt? I`m very interested in finding out what that value means.> > >>3. "dropped"- if the pkt is overlimit it may be dropped right? if it >>cannot be delayed, right? is this the reason why I have such a >>difference between them? >> >> >Between what? > >Between "overlimits" and "dropped"> > >>4. what is "level", the level in classes tree? >> >> >"Level of class determines its position in hierarchy. Leaves has level 0, >root classes LEVEL_COUNT-1 and each inner class has level one less than its >parent. See pictures below (LEVEL_COUNT=3 there). " > >I quoted some info from http://luxik.cdi.cz/~devik/qos/htb/ > >Stef > > >-- Anton Yurchenko<phila@dg.net.ua> Digital Generation
> >>1. why do I have "lended" for children classes almost the same as > >>"sent", who do they lend to? the neighboring classes? > >Yes, to other classes. > >"lended is # of packets donated by this class (from its rate)" > I did some experimenting, and had a root class and just 1 child class, > and this child class still had lended pkts to smbody. Who did it lend it > to?Can you send me your script so I know the settings of rate and ceil ? Or maybe Devik knows the answer.> >>2. What is overlimits? is it incremented when certain pkt goest above > >>"rate", what if both "rate" and "ceil"? incremented twice? > > > >overlimits : Packet is not sended due to ceil or rate restrictions So > > there was to much data in the class. But don''t believe this too much. > > It depends on how often the qdisc looked for packet. > > What does "looked" mean? could you pleases explain it a bit more? How > does it look for a pkt? I`m very interested in finding out what that > value means.I quoted it from Devik, he his also reading this list, so Devik, can clear this out.> >>3. "dropped"- if the pkt is overlimit it may be dropped right? if it > >>cannot be delayed, right? is this the reason why I have such a > >>difference between them? > >Between what? > Between "overlimits" and "dropped"If the packet is overlimit, it can also be delayed to be send later. Stef -- stef.coene@docum.org "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net
Stef Coene wrote:>>>>1. why do I have "lended" for children classes almost the same as >>>>"sent", who do they lend to? the neighboring classes? >>>> >>>> >>>Yes, to other classes. >>>"lended is # of packets donated by this class (from its rate)" >>> >>> >>I did some experimenting, and had a root class and just 1 child class, >>and this child class still had lended pkts to smbody. Who did it lend it >> >> >> >Can you send me your script so I know the settings of rate and ceil ? Or >maybe Devik knows the answer. > >---------------------------------------------------- Here goes ---------------------------------------------------- tc qd add dev eth0 root handle 1: htb default 2500 tc cl add dev eth0 root classid 1:1 htb rate 100mbit tc cl add dev eth0 parent 1:1 classid 1:100 rate 100kbit tc cl add dev eth0 parent 1:1 classid 1:101 rate 100kbit # to catch all that goes to default tc cl add dev eth0 parent 1:1 classid 1:2500 rate 1Mbit iptables -t mangle -A PREROUTING -s 172.20.0.1 -j MARK --set-mark 1 iptables -t mangle -A PREROUTING -d 172.20.0.1 -j MARK --set-mark 2 tc fi add dev eth0 protocol ip handle 1 fw classid 1:100 tc fi add dev eth0 protocol ip handle 2 fw classid 1:101 #> tc fi ls dev eth0 filter parent 1: protocol ip pref 49151 fw filter parent 1: protocol ip pref 49151 fw handle 0x2 classid 1:101 filter parent 1: protocol ip pref 49152 fw filter parent 1: protocol ip pref 49152 fw handle 0x1 classid 1:100 #> tc qd ls dev eth0 qdisc htb 1: r2q 10 default 2500 dcache 0 deq_util 1/1000000 deq_rate 33 trials_per_deq 0 dcache_hits 0 direct_packets 13403 #> iptables -t mangle -L Chain PREROUTING (policy ACCEPT) target prot opt source destination MARK all -- dg anywhere MARK set 0x1 MARK all -- anywhere dg MARK set 0x2 Chain INPUT (policy ACCEPT) target prot opt source destination MARK all -- dg anywhere MARK set 0x1 Chain FORWARD (policy ACCEPT) target prot opt source destination Chain OUTPUT (policy ACCEPT) target prot opt source destination MARK all -- anywhere dg MARK set 0x2 Chain POSTROUTING (policy ACCEPT) target prot opt source destination #> tc -s -d cl ls dev eth0 class htb 1:101 parent 1:1 prio 0 rate 100Kbit ceil 100Kbit burst 1727b/8 mpu 0b cburst 1727b/8 mpu 0b quantum 1280 level 0 Sent 42103 bytes 638 pkts (dropped 0, overlimits 698) lended: 638 borrowed: 0 giants: 0 injects: 0 tokens: 105984 ctokens: 105984 class htb 1:1 root prio 0 rate 100Mbit ceil 100Mbit burst 132644b/8 mpu 0b cburst 132644b/8 mpu 0b quantum 60000 level 3 Sent 1994248 bytes 4890 pkts (dropped 0, overlimits 0) rate 6934bps 15pps lended: 0 borrowed: 0 giants: 0 injects: 0 tokens: 8289 ctokens: 8289 class htb 1:100 parent 1:1 prio 0 rate 100Kbit ceil 100Kbit burst 1727b/8 mpu 0b cburst 1727b/8 mpu 0b quantum 1280 level 0 Sent 0 bytes 0 pkts (dropped 0, overlimits 0) lended: 0 borrowed: 0 giants: 0 injects: 0 tokens: 110592 ctokens: 110592 class htb 1:2500 parent 1:1 prio 0 rate 1Mbit ceil 1Mbit burst 2909b/8 mpu 0b cburst 2909b/8 mpu 0b quantum 13107 level 0 Sent 1952145 bytes 4252 pkts (dropped 0, overlimits 12) rate 6958bps 14pps lended: 4252 borrowed: 0 giants: 0 injects: 0 tokens: 17031 ctokens: 17031 ---------------------------------------------------- so who does 1:2500 and 1:101 lend the tokens too, when none of the classes show borrowed > 0> > >>>>2. What is overlimits? is it incremented when certain pkt goest above >>>>"rate", what if both "rate" and "ceil"? incremented twice? >>>> >>>> >>>overlimits : Packet is not sended due to ceil or rate restrictions So >>>there was to much data in the class. But don''t believe this too much. >>>It depends on how often the qdisc looked for packet. >>> >>> >>What does "looked" mean? could you pleases explain it a bit more? How >>does it look for a pkt? I`m very interested in finding out what that >>value means. >> >> >I quoted it from Devik, he his also reading this list, so Devik, can clear >this out. > > > >>>>3. "dropped"- if the pkt is overlimit it may be dropped right? if it >>>>cannot be delayed, right? is this the reason why I have such a >>>>difference between them? >>>> >>>> >>>Between what? >>> >>> >>Between "overlimits" and "dropped" >> >> >If the packet is overlimit, it can also be delayed to be send later. > >Stef > > >-- Anton Yurchenko<phila@dg.net.ua> Digital Generation
> > >>1. why do I have "lended" for children classes almost the same as > > >>"sent", who do they lend to? the neighboring classes? > > >Yes, to other classes. > > >"lended is # of packets donated by this class (from its rate)" > > I did some experimenting, and had a root class and just 1 child class, > > and this child class still had lended pkts to smbody. Who did it lend it > > to? > Can you send me your script so I know the settings of rate and ceil ? Or > maybe Devik knows the answer.leaf class also "lends" to itself ...> > >overlimits : Packet is not sended due to ceil or rate restrictions So > > > there was to much data in the class. But don''t believe this too much. > > > It depends on how often the qdisc looked for packet. > > > > What does "looked" mean? could you pleases explain it a bit more? How > > does it look for a pkt? I`m very interested in finding out what that > > value means. > I quoted it from Devik, he his also reading this list, so Devik, can clear > this out.It is incremented per unsucessfull DRR loop.> > >Between what? > > Between "overlimits" and "dropped" > If the packet is overlimit, it can also be delayed to be send later.overlimits >> dropped. It is because for each drop there is overlimit but there is more overlimits (see prev. paragraph). devik