HTB rate miscalculation
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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 12 lines · Marcus Felipe Pereira
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.
Quoted 8 lines
"# 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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 24 lines
Quoted 15 lines
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.Quoted 6 lines
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?
Quoted 8 lines
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:1Andy.
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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 36 lines · Marcus Felipe Pereira
Quoted 28 lines
Quoted 15 lines
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.Quoted 6 lines
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 -
Quoted 6 lines
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:1Andy.
Quoted 8 lines
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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc
Quoted 41 lines
Quoted 41 lines
Quoted 26 lines
Quoted 13 lines
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.Quoted 6 lines
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 -
Quoted 6 lines
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:1Andy.
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.
Quoted 8 lines
Quoted 1 line
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
[email protected]
http://mailman.ds9a.nl/cgi-bin/mailman/listinfo/lartc