[ltp] tbf/htb on ThinkPad R52, inaccurate transfers.

Marcin Konarski linux-thinkpad@linux-thinkpad.org
Sun, 31 Dec 2006 19:50:32 +0100


Hello,

I got two computers, one desktop (lets call it c1)
and second which is ThinkPad R52 (lets call it c0),
with the same operating system PLD AC (PLD - PLD Linux Distribution).
I am learning tc, I utilise very simple configuration,
I have chosen just for testing purposes to limit global outgoing
transfer to 100KiB/s, I played both with tbf and htb.
My both computers are connected by 100Mbit Ethernet.

My setup:

tbf case:
tc qdisc add dev eth0 root tbf rate 100kbps burst 10kb latency 70ms peakrate 101kbps mtu 1540

htb case:
tc qdisc add dev eth0 root handle 1: htb default 10
tc class add dev eth0 parent 1:0 classid 1:10 htb rate 100kbps ceil 100kbps cburst 0

I perform test by sending files from c0 to c1 (when tc tbf/htb is run
on and only on c0), and from c1 to c0 (when tc tbf/htb is set up
on and only on c1).

Without tc both of my computers have upload transfer rate
close to 11MiB/s. 

When I use tbf/htb on my desktop computer, upload transfer rate
I have measured is in the expected rate range (around 100KiB/s).
My problem is with my R52, when I use tbf upload rate about 11KiB/s,
and in case of htb transfer equals 480 KiB/s.

I do not know what can be the reason of such behavior.

Feral computer is:

IBM ThinkPad R52 Intel(R) Pentium(R) M processor 1.73GHz,
Ethernet controller: Broadcom Corporation NetXtreme BCM5751M Gigabit
Ethernet PCI Express,
1GB RAM,

For my Ethernet card on R52 I use tg3 module if that matters.

Operating system, as I have mentioned is PLD AC
with 2.6.18 kernel, I have also tried to run my test on Debian Sid
also equipped with 2.6.18 kernel.

Following the advise from Polish newsgroup I have recompiled
kernel with CONFIG_NET_SCH_CLK_GETTIMEOFDAY=y setting.
No luck this time also.

I am heavily desperate and short of ideas, any help
will be really appreciated.

I attach output from "tc -s class show dev eth0" command.
This command had been invoked after uploading 240MiB of data from c0 to
c1.

class htb 1:10 root prio 0 rate 800000bit ceil 800000bit burst 1999b cburst 1999b
 Sent 166303889 bytes 21612 pkt (dropped 0, overlimits 0 requeues 0)
 rate 3149Kbit 50pps backlog 0b 23p requeues 0
 lended: 21589 borrowed: 0 giants: 39532
 tokens: -41008 ctokens: -41008

Best regards.

-- 
  Huginn
GCS d? s:+>: a- C++$() UB++++$ P++ L++++$ E---
W+(-) N++ o? K? w-- O M- V- PS+ PE++ Y PGP-
t--- 5-- X- R !tv b++ DI++ D+ G e* h+ !r>++ y>+