* [LARTC] HTB rate miscalculation
@ 2005-05-04 22:56 Marcus Felipe Pereira
2005-05-06 0:19 ` Andy Furniss
` (3 more replies)
0 siblings, 4 replies; 5+ messages in thread
From: Marcus Felipe Pereira @ 2005-05-04 22:56 UTC (permalink / raw)
To: lartc
Hi,
I've migrated my tc configuration from CBQ to HTB.
One problem appeared. Htb seems to miscalculate the bandwidth for classes
with greater rates.
For rates below 2Mbit there is almost no difference between the configured
and the measured rate.
For large ones the problem starts. My root class has 10Mbit rate and when
the interface has heavy trafic the measured bandwidth coudn't get more then
8.5Mbit.
"# tc -s class show ...." shows that the root class has about the 10Mbit,
but the link stats shows mutch less.
The solution was to put the htb ceil on about 12Mbit. Then I can get to
the 10Mbit. When using CBQ I didn't have this problem.
Is there any parameter that I can change to correct the rate calculation?
Any one has similar problem?
Marcus Pereira
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] HTB rate miscalculation
2005-05-04 22:56 [LARTC] HTB rate miscalculation Marcus Felipe Pereira
@ 2005-05-06 0:19 ` Andy Furniss
2005-05-06 15:36 ` Marcus Felipe Pereira
` (2 subsequent siblings)
3 siblings, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2005-05-06 0:19 UTC (permalink / raw)
To: lartc
Marcus Felipe Pereira wrote:
> Hi,
> I've migrated my tc configuration from CBQ to HTB.
>
> One problem appeared. Htb seems to miscalculate the bandwidth for
> classes with greater rates.
> For rates below 2Mbit there is almost no difference between the
> configured and the measured rate.
>
> For large ones the problem starts. My root class has 10Mbit rate and
> when the interface has heavy trafic the measured bandwidth coudn't get
> more then 8.5Mbit.
>
> "# tc -s class show ...." shows that the root class has about the
> 10Mbit, but the link stats shows mutch less.
>
> The solution was to put the htb ceil on about 12Mbit. Then I can get to
> the 10Mbit. When using CBQ I didn't have this problem.
>
> Is there any parameter that I can change to correct the rate calculation?
> Any one has similar problem?
What counters are you using to measure?
Does it do the same if you test with a single tcp stream and a very
simple setup like -
tc qdisc add dev eth0 root handle 1:0 htb
tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
tc filter add dev eth0 parent 1:0 protocol ip u32 match u32 0 0 flowid 1:1
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] HTB rate miscalculation
2005-05-04 22:56 [LARTC] HTB rate miscalculation Marcus Felipe Pereira
2005-05-06 0:19 ` Andy Furniss
@ 2005-05-06 15:36 ` Marcus Felipe Pereira
2005-05-09 22:21 ` Andy Furniss
2005-05-10 13:17 ` Marcus Felipe Pereira
3 siblings, 0 replies; 5+ messages in thread
From: Marcus Felipe Pereira @ 2005-05-06 15:36 UTC (permalink / raw)
To: lartc
>> Hi,
>> I've migrated my tc configuration from CBQ to HTB.
>>
>> One problem appeared. Htb seems to miscalculate the bandwidth for
>> classes with greater rates.
>> For rates below 2Mbit there is almost no difference between the
>> configured and the measured rate.
>>
>> For large ones the problem starts. My root class has 10Mbit rate and
>> when the interface has heavy trafic the measured bandwidth coudn't get
>> more then 8.5Mbit.
>>
>> "# tc -s class show ...." shows that the root class has about the
>> 10Mbit, but the link stats shows mutch less.
>>
>> The solution was to put the htb ceil on about 12Mbit. Then I can get to
>> the 10Mbit. When using CBQ I didn't have this problem.
>>
>> Is there any parameter that I can change to correct the rate
>> calculation?
>> Any one has similar problem?
>
> What counters are you using to measure?
>
> Does it do the same if you test with a single tcp stream and a very simple
> setup like -
>
> tc qdisc add dev eth0 root handle 1:0 htb
> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
> tc filter add dev eth0 parent 1:0 protocol ip u32 match u32 0 0 flowid 1:1
>
> Andy.
I've done more tests, in fact there is a difference in the measure.
The rate measured by htb class, iptraf and iptables show very similar
numbers.
The rate measured using SNMP ifInOctets and ifOutOctets (snmpget, ddrtool
and mrtg) show rates about 20% less than htb.
Why this difference?
Marcus
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] HTB rate miscalculation
2005-05-04 22:56 [LARTC] HTB rate miscalculation Marcus Felipe Pereira
2005-05-06 0:19 ` Andy Furniss
2005-05-06 15:36 ` Marcus Felipe Pereira
@ 2005-05-09 22:21 ` Andy Furniss
2005-05-10 13:17 ` Marcus Felipe Pereira
3 siblings, 0 replies; 5+ messages in thread
From: Andy Furniss @ 2005-05-09 22:21 UTC (permalink / raw)
To: lartc
Marcus Felipe Pereira wrote:
>>> Hi,
>>> I've migrated my tc configuration from CBQ to HTB.
>>>
>>> One problem appeared. Htb seems to miscalculate the bandwidth for
>>> classes with greater rates.
>>> For rates below 2Mbit there is almost no difference between the
>>> configured and the measured rate.
>>>
>>> For large ones the problem starts. My root class has 10Mbit rate and
>>> when the interface has heavy trafic the measured bandwidth coudn't
>>> get more then 8.5Mbit.
>>>
>>> "# tc -s class show ...." shows that the root class has about the
>>> 10Mbit, but the link stats shows mutch less.
>>>
>>> The solution was to put the htb ceil on about 12Mbit. Then I can get
>>> to the 10Mbit. When using CBQ I didn't have this problem.
>>>
>>> Is there any parameter that I can change to correct the rate
>>> calculation?
>>> Any one has similar problem?
>>
>>
>> What counters are you using to measure?
>>
>> Does it do the same if you test with a single tcp stream and a very
>> simple setup like -
>>
>> tc qdisc add dev eth0 root handle 1:0 htb
>> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
>> tc filter add dev eth0 parent 1:0 protocol ip u32 match u32 0 0 flowid
>> 1:1
>>
>> Andy.
>
>
> I've done more tests, in fact there is a difference in the measure.
>
> The rate measured by htb class, iptraf and iptables show very similar
> numbers.
> The rate measured using SNMP ifInOctets and ifOutOctets (snmpget,
> ddrtool and mrtg) show rates about 20% less than htb.
>
> Why this difference?
Not sure - I can get netperf, htb counters and polling ifconfig counters
every second to agree and show correct rate with the simple case above.
I don't have snmpget to test.
Andy.
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [LARTC] HTB rate miscalculation
2005-05-04 22:56 [LARTC] HTB rate miscalculation Marcus Felipe Pereira
` (2 preceding siblings ...)
2005-05-09 22:21 ` Andy Furniss
@ 2005-05-10 13:17 ` Marcus Felipe Pereira
3 siblings, 0 replies; 5+ messages in thread
From: Marcus Felipe Pereira @ 2005-05-10 13:17 UTC (permalink / raw)
To: lartc
>>>> One problem appeared. Htb seems to miscalculate the bandwidth for
>>>> classes with greater rates.
>>>> For rates below 2Mbit there is almost no difference between the
>>>> configured and the measured rate.
>>>>
>>>> For large ones the problem starts. My root class has 10Mbit rate and
>>>> when the interface has heavy trafic the measured bandwidth coudn't get
>>>> more then 8.5Mbit.
>>>>
>>>> "# tc -s class show ...." shows that the root class has about the
>>>> 10Mbit, but the link stats shows mutch less.
>>>>
>>>> The solution was to put the htb ceil on about 12Mbit. Then I can get
>>>> to the 10Mbit. When using CBQ I didn't have this problem.
>>>>
>>>> Is there any parameter that I can change to correct the rate
>>>> calculation?
>>>> Any one has similar problem?
>>>
>>>
>>> What counters are you using to measure?
>>>
>>> Does it do the same if you test with a single tcp stream and a very
>>> simple setup like -
>>>
>>> tc qdisc add dev eth0 root handle 1:0 htb
>>> tc class add dev eth0 parent 1:0 classid 1:1 htb rate 10mbit
>>> tc filter add dev eth0 parent 1:0 protocol ip u32 match u32 0 0 flowid
>>> 1:1
>>>
>>> Andy.
>>
>>
>> I've done more tests, in fact there is a difference in the measure.
>>
>> The rate measured by htb class, iptraf and iptables show very similar
>> numbers.
>> The rate measured using SNMP ifInOctets and ifOutOctets (snmpget, ddrtool
>> and mrtg) show rates about 20% less than htb.
>>
>> Why this difference?
>
> Not sure - I can get netperf, htb counters and polling ifconfig counters
> every second to agree and show correct rate with the simple case above.
>
> I don't have snmpget to test.
>
> Andy.
The difference is for sure on snmp counters, that's what mrtg an ddrtool
use.
Getting counters for eth0 (should have snmp daemon running):
ifInOctets=`/usr/bin/snmpget -v1 -c <snmppass> <host>
.1.3.6.1.2.1.2.2.1.10.2 | cut -f4 -d:`
ifOutOctets=`/usr/bin/snmpget -v1 -c <snmppass> <host>
.1.3.6.1.2.1.2.2.1.16.2 | cut -f4 -d:`
Marcus
_______________________________________________
LARTC mailing list
LARTC@mailman.ds9a.nl
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2005-05-10 13:17 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-05-04 22:56 [LARTC] HTB rate miscalculation Marcus Felipe Pereira
2005-05-06 0:19 ` Andy Furniss
2005-05-06 15:36 ` Marcus Felipe Pereira
2005-05-09 22:21 ` Andy Furniss
2005-05-10 13:17 ` Marcus Felipe Pereira
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.