Bug 9273 - rt2500pci: low TCP throughput
Summary: rt2500pci: low TCP throughput
Status: RESOLVED OBSOLETE
Alias: None
Product: Drivers
Classification: Unclassified
Component: network-wireless (show other bugs)
Hardware: All Linux
: P1 normal
Assignee: Ivo van Doorn
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2007-11-01 05:15 UTC by Marcus Better
Modified: 2012-10-30 14:33 UTC (History)
13 users (show)

See Also:
Kernel Version: 2.6.32
Subsystem:
Regression: Yes
Bisected commit-id:


Attachments
Never request ACK for rts frame (756 bytes, patch)
2007-11-15 11:32 UTC, Ivo van Doorn
Details | Diff
Never request ACK for rts frame (patch v2) (747 bytes, patch)
2007-11-16 11:04 UTC, Ivo van Doorn
Details | Diff

Description Marcus Better 2007-11-01 05:15:52 UTC
Distribution: Debian with mainline kernel
Hardware Environment: LG LE50 Express laptop (i386, Pentium M)
Software Environment: Debian testing/unstable

The rt2500pci driver gives low throughput for TCP traffic. See the discussion on wireless-dev [1] for more details.

The latest working version of the driver was 2.0.7 with kernel 2.6.23-rc3 (from the wireless-dev tree). It gave receive throughput of at least 10 Mbit/s as measured by tptest and HTTP downloads (from the Internet, so not only the local link).

However since version 2.0.9 (wireless-dev), and also the current mainline 2.0.10, and 2.0.11 (wireless-2.6), receive throughput is only about 300 kbit/s. tptest still indicates UDP receive throughput of around 10 Mbit/s though.

[1] http://permalink.gmane.org/gmane.linux.kernel.wireless.general/6830
Comment 1 Marcus Better 2007-11-14 00:51:37 UTC
Still present in driver version 2.0.12 (wireless-2.6 kernel 2.6.24-rc1).
Comment 2 John W. Linville 2007-11-14 14:41:04 UTC
Can you checkout commit 95ea36275f3c9a1d3d04c217b4b576c657c4e70e and test there?  That is when rt2x00 was added upstream.

If that works, can you git-bisect between there and 2.6.24-rc2?
Comment 3 Marcus Better 2007-11-15 02:21:48 UTC
> ------- Comment #2 from linville@tuxdriver.com  2007-11-14 14:41 -------
> Can you checkout commit 95ea36275f3c9a1d3d04c217b4b576c657c4e70e and test
> there?  That is when rt2x00 was added upstream.

Is this still needed in view of the latest workaround [1] ?

Marcus

[1] http://permalink.gmane.org/gmane.linux.kernel.wireless.general/7797
Comment 4 John W. Linville 2007-11-15 05:52:39 UTC
Well a workaround is just that. :-)  It would be nice if we could actually find what has broken the rate scaling for rt2x00.
Comment 5 Marcus Better 2007-11-15 08:36:36 UTC
> ------- Comment #4 from linville@tuxdriver.com  2007-11-15 05:52 -------
> Well a workaround is just that. :-)  It would be nice if we could actually
> find what has broken the rate scaling for rt2x00.

Ok, I will try. What path parameters should I give git-bisect to narrow it 
down?
Comment 6 John W. Linville 2007-11-15 09:51:19 UTC
Probably drivers/net/wireless/rt2x00 is sufficient, but it might be worthwhile to include net/mac80211 and even net/wireless just to be sure.

Thanks!
Comment 7 Ivo van Doorn 2007-11-15 11:32:58 UTC
Created attachment 13565 [details]
Never request ACK for rts frame

Does applied patch help?
Comment 8 Marcus Better 2007-11-15 23:21:17 UTC
(In reply to comment #2)
> Can you checkout commit 95ea36275f3c9a1d3d04c217b4b576c657c4e70e and test
> there?  That is when rt2x00 was added upstream.

This doesn't work at all. It doesn't associate. (I use WEP with wpa_supplicant.) But the logs don't show anything suspicious either. I have the debugging options on.
Comment 9 Marcus Better 2007-11-16 00:16:57 UTC
(In reply to comment #7)
> Never request ACK for rts frame
> 
> Does applied patch help?

Do you have a patch that applies to mainline git? This one didn't work even after making it apply:

drivers/net/wireless/rt2x00/rt2x00dev.c: In function ‘rt2x00lib_write_tx_desc’:
drivers/net/wireless/rt2x00/rt2x00dev.c:489: error: ‘ENTRY_TXD_ACK’ undeclared (first use in this function)
drivers/net/wireless/rt2x00/rt2x00dev.c:489: error: (Each undeclared identifier is reported only once
drivers/net/wireless/rt2x00/rt2x00dev.c:489: error: for each function it appears in.)
Comment 10 Ivo van Doorn 2007-11-16 11:04:16 UTC
Created attachment 13580 [details]
Never request ACK for rts frame (patch v2)

Sorry about that, I thought a more recent rt2x00 version was in Linus' tree.
Here is the updated patch, this only changes rt2500pci, so the other drivers are not affected.
Comment 11 Marcus Better 2007-11-18 12:09:21 UTC
> Here is the updated patch, this only changes rt2500pci, so the other drivers
> are not affected.

That didn't work either:

   CC [M]  drivers/net/wireless/rt2x00/rt2x00dev.o
drivers/net/wireless/rt2x00/rt2x00dev.c: In function 
Comment 12 Ivo van Doorn 2007-11-18 13:30:08 UTC
Did you revert the previous patch?
Since the new patch only touched rt2500pci, so there should be no compile error on rt2x00dev.c unless off course it failed to compile without any patches as well. ;)
Comment 13 Marcus Better 2007-11-19 04:15:27 UTC
> ------- Comment #12 from IvDoorn@gmail.com  2007-11-18 13:30 -------
> Did you revert the previous patch?

Oops, I must have messed up my tree. Anyway the patch does not help, the rate 
is still 1 Mb and transfers are slow. Tested on 2.6.24-rc3 (which by the way 
seems to break autoloading of modules, at least for rt2x00 and the tun 
driver).
Comment 14 Ken Lewis 2007-12-14 11:10:53 UTC
Had this issue in 2.6.24-rc1 to rc4.

Am working round it with a manual trick:
#iwconfig wlan0 rts 800
#iwconfig wlan0 rate 54M
#iwconfig wlan0 rts off
Comment 15 Ivo van Doorn 2008-01-10 13:00:32 UTC
This seems to be fixed in rt2x00.git and wireless-2.6.git now, I am however unsure which fix actually did the trick. :S
Comment 16 Marcus Better 2008-02-05 00:49:44 UTC
(In reply to comment #15)
> This seems to be fixed in rt2x00.git and wireless-2.6.git now,

Great!

(For reference, 2.6.24 still has the bug.)

Marcus
Comment 17 Marcus Better 2008-03-26 01:59:18 UTC
Confirmed fixed in 2.6.25-rc6.
Comment 18 Andrey Melentyev 2008-04-19 08:16:07 UTC
Was it really fixed? I can't get any normal network connection speed with rt2500pci from 2.6.25. The trick with manual rate setting with iwconfig doesn't work for me either.

00:06.0 Network controller: RaLink RT2500 802.11g Cardbus/mini-PCI (rev 01)
Comment 19 Marcus Better 2008-04-22 03:37:15 UTC
> ------- Comment #18 from rikz@yandex.ru  2008-04-19 08:16 -------
> Was it really fixed? I can't get any normal network connection speed with
> rt2500pci from 2.6.25.

Seems to work here, but the rate is set at 1 Mb/s unless I change it 
with iwconfig.
Comment 20 Jan Hoogenraad 2008-11-02 12:01:37 UTC
Given the texts above, the bug is still present. Lots of complaints from Ubuntu users. Thus, reopening this bug would be appropriate.

see: 
-- [Hardy][Intrepid] Low bandwidth with rt2400 / rt2500 drivers https://bugs.launchpad.net/bugs/190515
and
https://sourceforge.net/tracker/index.php?func=detail&aid=2216782&group_id=107832&atid=648844
Comment 21 Ivo van Doorn 2008-11-02 15:12:03 UTC
Can you confirm this bug is present in a _vanilla_ kernel and not caused by an outdated rt2x00 version in the Ubuntu kernel.
Comment 22 Ken Lewis 2008-11-03 00:11:34 UTC
(In reply to comment #21)
> Can you confirm this bug is present in a _vanilla_ kernel and not caused by
> an
> outdated rt2x00 version in the Ubuntu kernel.
It's been in the vanilla kernels I test for ages.  I can confirm it's still an issue (for rt2500pci) in the Ubuntu 8.04 kernel linux-image-2.6.27-4-generic and linux-image2.6.27-7-generic, the linux-next tree (at least to next-20081023 -- I'm having build issues atm) and will test 2.6.28-rc2 and confirm later.

Ken.
Comment 23 Ken Lewis 2008-11-03 02:26:18 UTC
(In reply to comment #22)
> ...  will test 2.6.28-rc2 and confirm later.
Still has same issue in 2.6.28-rc3.

Ken.
Comment 24 Florian Sievers 2009-01-08 04:00:15 UTC
I can confirm this bug in vanilla 2.6.28.

Manual workaround:
#> iwconfig wlan0 rate 54M
#> iwconfig wlan0 rate fixed

After that, the wlan device is working with full 54Mbit rate again.
(scp kernel package (.bz2) with 2MB/s Transferrate)
Comment 25 Aleksey Nogin 2011-04-29 18:38:23 UTC
With the 2.3.0 version of the rt2500pci driver (CentOS 5 with 2.6.18-238.9.1.el5 kernel), I see the download speed of ~1Mbps, while the upload is OK and iwconfig claiming the 54M rate. No amount of iwconfig tweaking (comment 14, comment 24) works. The only workaround I found is to revert to rt2500 1.1.0 BETA4 driver :-(

I do not know is CentOS's rt2500pci is too old to be worth debugging, but if not, I'd be happy to provide more information.

P.S. I measured speed with speedtest.comcast.net - ~1Mbps down with rt2500pci and ~10Mbps with the old rt2500, and ~3Mbps up in both cases. If it would be useful to anybody, I can measure with ttcp between local machines to get more meaningful numbers.
Comment 26 Cody Jackson 2011-08-16 19:47:02 UTC
I am running CentOS 6.0 (2.6.32-71.29.1.el6.i686) and can confirm the bug there. 

My rt2500-based card (Linksys Wireless-G) used to slow from ~2MB/s to ~100KB/s on rsync'ing large files to and from that machine, and would stay at ~100KB/s until I brought the interface down and up again. No amount of tweaking with iwconfig would solve this problem.

Recently, I replaced my Netgear WGR614v6 wireless router (running the latest firmware (wgr614v6_2_0_19_1_0_19_na.chk),  with a Belkin F5D7231-4 wireless router running the latest firmware. The problem has disappeared. I can sustain about 2.3MB/s to the rt2500 and have been able to do so for about five days now.

Signal strength has NOT improved, but throughput has.

I hope this helps somehow. The problem, as a guess, appears to be tied to specific routers and/or chipsets. This Belkin seems to act a little differently than the Netgear. For example, throughput is up to *any* wifi device by 50% or so compared to the Netgear--but I can't stream videos over Samba (yah yah, I know, bad idea) anymore. Interesting.
Comment 27 Alan 2012-10-30 14:33:31 UTC
Closing as obsolete, please update/re-open if seen in 3.0 or later kernels

Note You need to log in before you can comment on or make changes to this bug.