Re: HTB - Rate errors

Linux Advanced Routing and Traffic Control

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

 



El Wednesday 26 April 2006 13:00, Luke McConnell escribió:
> Hi,
>
> I'm trying to get HTB working correctly on Centos4 (RHEL-based) with
> kernel 2.6.9-34.EL. I have two gigabit network interfaces bridged
> together and I have created the following:
>
> tc qdisc add dev eth2 root handle 1: htb default 1 r2q 8000
> tc class add dev eth2 parent 1: classid 1:1 htb rate 100Mbit burst 24k
> cburst 24k
>
> (I have been trying different parameters).
>
> The network is passing ~80MBits of traffic but HTB is not seeing the
> rate correctly (which obviously causes problems when I try to shape a
> sub-set of the traffic). These are approx 1 second apart:
>
> [root@ ~]# tc -s -d class sh dev eth2
> class htb 1:1 root prio 0 quantum 1562 rate 100Mbit ceil 100Mbit burst
> 24Kb/8 mpu 0b overhead 0b cburst 24Kb/8 mpu 0b overhead 0b level 0
>  Sent 654872932 bytes 830973 pkts (dropped 0, overlimits 0 requeues 0)
>  rate 7827086bit 9941pps
>  lended: 830973 borrowed: 0 giants: 0
>  tokens: 1479 ctokens: 1479
>
> [root@ ~]# tc -s -d class sh dev eth2
> class htb 1:1 root prio 0 quantum 1562 rate 100Mbit ceil 100Mbit burst
> 24Kb/8 mpu 0b overhead 0b cburst 24Kb/8 mpu 0b overhead 0b level 0
>  Sent 663902498 bytes 842747 pkts (dropped 0, overlimits 0 requeues 0)
>  rate 7827086bit 9941pps
>  lended: 842747 borrowed: 0 giants: 0
>  tokens: 1527 ctokens: 1527
>
> That's a transfer of around 9MBytes, yet HTB is only reporting just
> under 8Mbits/sec. Has anyone got any suggestions for me to try?

CentOS's tc version(iproute2-ss040831) is known to have buggy rates(at least 
for htb). You have to multiply by 8 the rate value.

You can use htb-stats[1] script made bye jjo ciarlante, it is bery usefull to 
see real-time htb class rates, this script has a (soft)fix for the bug in 
CentOS and display htb rates correctly.

[1] http://freshmeat.net/projects/htb-stats/
-- 
Luciano
_______________________________________________
LARTC mailing list
LARTC@xxxxxxxxxxxxxxx
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc


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