HTB stats
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.
Signature · 7 lines
Anton Yurchenko<[email protected]> Digital Generation _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 10 lines · Anton Yurchenko
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?
Quoted 3 lines
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)"
Quoted 2 lines
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.
Quoted 3 lines
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?
Quoted 1 line
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
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 15 lines · Stef Coene
Quoted 12 lines · Anton Yurchenko
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.
Quoted 3 lines
So the ceil is smaller then the rate?
Sorry mistype. ceil is "rate" + 1/3 rate
Quoted 11 lines
Quoted 7 lines
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?
Quoted 9 lines
Quoted 6 lines
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.
Quoted 10 lines
Quoted 7 lines
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"
Quoted 13 lines
Quoted 5 lines
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
Signature · 2 lines
Anton Yurchenko<[email protected]> Digital Generation
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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.
Quoted 10 lines
Quoted 6 lines
Quoted 2 lines
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.
Quoted 5 lines
Quoted 4 lines
Quoted 3 lines
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
Signature · 7 lines
[email protected] "Using Linux as bandwidth manager" http://www.docum.org/ #lartc @ irc.openprojects.net _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 8 lines · Stef Coene
Quoted 8 lines
Quoted 8 lines
Quoted 4 lines
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)"
Quoted 9 lines
Quoted 5 lines
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
Quoted 38 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
2. What is overlimits? is it incremented when certain pkt goest above "rate", what if both "rate" and "ceil"? incremented twice?
Quoted 10 lines
Quoted 5 lines
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.
Quoted 11 lines
Quoted 8 lines
Quoted 5 lines
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
Signature · 8 lines
Anton Yurchenko<[email protected]> Digital Generation _______________________________________________ LARTC mailing list / [email protected] http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
Quoted 9 lines
Quoted 7 lines
Quoted 4 lines
Quoted 2 lines
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 ...
Quoted 9 lines
Quoted 7 lines
Quoted 3 lines
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.
Quoted 3 lines
Quoted 2 lines
Quoted 1 line
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
_______________________________________________
LARTC mailing list / [email protected]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/
[LARTC] htb stats
In reply to Anton YurchenkoHello. I have the fallowing stats when I write:
----tc -s -d qdisc ls dev eth1 ------
"qdisc htb 1: r2q 1 default 99 direct_packets_stat 358 ver 3.7
Sent 36115119 bytes 32068 pkts (dropped 0, overlimits 47848)
backlog 24p"
1. what does backlog 24p means here ?
2. I looked over my other htb classes in eth1 and never seen overlimits greater than 0, why do I have then overlimits in htb root ?. Does anyone can tell me more explicitly what overlimits is ?
3. And another thing if I could ask ;-) . Here is part of my htb log :
"HTB init, kernel part version 3.7
Nov 30 02:37:23 Rout-Raul kernel: HTB init, kernel part version 3.7 Nov 30 02:37:27 Rout-Raul kernel: HTB: quantum of class 10099 is small. Consider r2q change.<4>HTB: quantum of class 10099 is small. Consider r2q change.<7>htb*g j=89425972"
I have my r2q set to 1..I'm using a formula like r2q=LEAF_RATE/8*1000/1600. I was recommended by someone to use it. I really don't know why. Any suggestions ?