htb with negative number of tokens

Linux Advanced Routing and Traffic Control

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello!

I run my script, then check the results. Pieces of output:

<result>

 root@arthur:/etc/init.d# tc -s -d class show dev imq0
class htb 1:1010 parent 1:1 rate 7Kbit ceil 50Kbit burst 999b/8 mpu 0b
overhead 0b cburst 999b/8 mpu 0b overhead 0b level 6
 Sent 13646 bytes 42 pkts (dropped 0, overlimits 0)
 rate 106bps
 lended: 0 borrowed: 22 giants: 0
 tokens: -155926 ctokens: -95231
 
class htb 1:1023 parent 1:1020 leaf 1023: prio 3 quantum 1000 rate 2Kbit
ceil 50Kbit burst 999b/8 mpu 0b overhead 0b cburst 999b/8 mpu 0b
overhead 0b level
0                                                                                                                                                             
 Sent 315580 bytes 964 pkts (dropped 0, overlimits 0)
 rate 5485bps 16pps backlog 44p
 lended: 60 borrowed: 860 giants: 0
 tokens: -3424256 ctokens: -62464
 
class htb 1:1032 parent 1:1030 leaf 1032: prio 2 quantum 1000 rate 3Kbit
ceil 50Kbit burst 999b/8 mpu 0b overhead 0b cburst 999b/8 mpu 0b
overhead 0b level
0                                                                                                                                                             
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 2133332 ctokens: 128000
 
class htb 1:1045 parent 1:1040 leaf 1045: prio 5 quantum 1000 rate 1Kbit
ceil 50Kbit burst 999b/8 mpu 0b overhead 0b cburst 999b/8 mpu 0b
overhead 0b level
0                                                                                                                                                             
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 6400000 ctokens: 128000
 
class htb 1:1054 parent 1:1050 leaf 1054: prio 4 quantum 1000 rate 1Kbit
ceil 50Kbit burst 999b/8 mpu 0b overhead 0b cburst 999b/8 mpu 0b
overhead 0b level
0                                                                                                                                                             
 Sent 0 bytes 0 pkts (dropped 0, overlimits 0)
 lended: 0 borrowed: 0 giants: 0
 tokens: 6400000 ctokens: 128000
 
class htb 1:1 root rate 50Kbit ceil 50Kbit burst 999b/8 mpu 0b overhead
0b cburst 999b/8 mpu 0b overhead 0b level 7
 Sent 322094 bytes 1014 pkts (dropped 0, overlimits 0)
 rate 5593bps 16pps
 lended: 803 borrowed: 0 giants: 0
 tokens: -186353 ctokens: -186353

</result> 

1. Why do I have negative number of tokens in some classes, especially
1:1 ? I don't think it should be possible.

2. Probably connected to question 1, having rate=ceil=50kbit why can I
still download stuff at rate ~10Kbyte/s?

3. Same parameters as above, downloads go at rate ~10Kbyte/s:

 root@arthur:/etc/init.d# tc -s -d qdisc show dev imq0
 qdisc htb 1: r2q 1 default 1015 direct_packets_stat 9 ver 3.13
 Sent 1698356 bytes 4852 pkts (dropped 40, overlimits 7224)
 backlog 61p

In general something is very wrong here. I'm unable to limit traffic to
become bottleneck and be able to shape traffic.

Can anyone tell me why?

(If output isn't enough I can send my script which is quite big,
~14Kbytes)

Greetings

-- 
 --== Jacek "Dino" Bilski ==--  --== Registered Linux User #165468 ==--
    --== dino@xxxxxxxxxxxxxxxxxxx ==--         --== GG# 3484913 ==--
-= 1024D/5B44CFBE   2228 3F73 A678 81C3 4ABE 2617 C77C AE70 5B44 CFBE =-


_______________________________________________
LARTC mailing list / LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/mailman/listinfo/lartc HOWTO: http://lartc.org/

[Index of Archives]     [LARTC Home Page]     [Netfilter]     [Netfilter Development]     [Network Development]     [Bugtraq]     [GCC Help]     [Yosemite News]     [Linux Kernel]     [Fedora Users]
  Powered by Linux