Re: [LARTC] HTB and iptables statistics

2004-07-01 Thread Stef Coene
On Wednesday 30 June 2004 19:13, Alexander Kotelnikov wrote:
 Hello.

 The problems are:
 1. Using HTB I get negative values for tokens and ctokens in tc -s
 output, for example:
This is perfectly possible.  It depends on your configuration and the 
parent-child relation ship between the classes.
If a class has a token, it can send a packet.  But if a child class is sending 
a packet, a token of the parent class is also used.  And a class can use it 
tokens even if the parent class has no tokens left.  So it's possible to drag 
the tokens negative if the child class is more sending packets then the 
parent allows.  But the parent can not forbid this.

Stef


-- 
[EMAIL PROTECTED]
 Using Linux as bandwidth manager
     http://www.docum.org/
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and iptables statistics

2004-07-01 Thread Andreas Klauer
Am Thursday 01 July 2004 22:52 schrieb Stef Coene:
 So it's possible to drag the tokens negative if the child class is more
 sending packets then the parent allows.

If I understand you right, it's only the parent classes that can get 
negative tokens this way. But I also have leaf classes with negative 
tokens. Does this mean there's something wrong?

Are negative tokens a good thing, or rather a bad thing?
Any way to prevent them?

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


[LARTC] HTB and iptables statistics

2004-06-30 Thread Alexander Kotelnikov
Hello.

The problems are:
1. Using HTB I get negative values for tokens and ctokens in tc -s
output, for example:
mich:~# tc -s -d class show dev eth0
class htb 1:11 parent 1:1 prio 1 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 
0b 
cburst 1628b/8 mpu 0b level 0
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 1287999 ctokens: 453286

class htb 1:1 root rate 32Kbit ceil 32Kbit burst 1639b/8 mpu 0b cburst 1639b/8 mpu 0b 
level 7 
 Sent 2629492 bytes 29142 pkts (dropped 0, overlimits 0) 
 rate 1777bps 19pps 
 lended: 7716 borrowed: 0 giants: 0
 tokens: 297600 ctokens: 297600

class htb 1:10 parent 1:1 prio 0 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 
0b cburst 1628b/8 mpu 0b level 0 
 Sent 160004 bytes 1252 pkts (dropped 0, overlimits 0) 
 rate 281bps 2pps 
 lended: 1252 borrowed: 0 giants: 0
 tokens: 1236799 ctokens: 435478

class htb 1:13 parent 1:1 prio 7 quantum 1024 rate 8Kbit ceil 16Kbit burst 1609b/8 mpu 
0b cburst 1619b/8 mpu 0b level 0 
 Sent 1266825 bytes 12307 pkts (dropped 20013, overlimits 0) 
 rate 1301bps 14pps 
 lended: 6340 borrowed: 5967 giants: 0
 tokens: -492394 ctokens: 581313

class htb 1:12 parent 1:1 prio 2 quantum 1024 rate 8Kbit ceil 23Kbit burst 1609b/8 mpu 
0b cburst 1628b/8 mpu 0b level 0 
 Sent 1202663 bytes 15583 pkts (dropped 0, overlimits 0) 
 rate 245bps 3pps 
 lended: 13834 borrowed: 1749 giants: 0
 tokens: 1236799 ctokens: 435478

Actually, this values are not described at
http://luxik.cdi.cz/~devik/qos/htb/manual/userg.htm#stats but it looks
confusing.

2. When I measure traffic marking any packet in POSTROUTING with
   'iptables -A POSTROUTING -t mangle -o eth0 -j MARK --set-mark 12'
   and using bytes field of 'iptables -vL  POSTROUTING -t mangle'
   output (I run the latter command once in a minute and divide the
   difference by 60) I get traffic speed up to 12kbs, even my
   uplink is no more than 32Kbit. How can this be?

Thanks,
-- 
Alexander Kotelnikov
Saint-Petersburg, Russia
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/


Re: [LARTC] HTB and iptables statistics

2004-06-30 Thread Andreas Klauer
Am Wednesday 30 June 2004 19:13 schrieb Alexander Kotelnikov:

 Using HTB I get negative values for tokens and ctokens in tc -s output

Can't help you there.

 class htb 1:13 parent 1:1 prio 7 quantum 1024 rate 8Kbit ceil 16Kbit
[...]
 12307 pkts (dropped 20013, overlimits 0)


 I get traffic speed up to 12kbs, even my
 uplink is no more than 32Kbit. How can this be?

My guess: Not every packet that passes your IPTables rule does actually 
find it's way to the uplink. The 'dropped' counter of your 1:13 class
indicates that many packets are just thrown away.

Andreas
___
LARTC mailing list / [EMAIL PROTECTED]
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/