Bug 12131 (rtl8187b)

Summary: network speed drops to to a fixed amount.
Product: Drivers Reporter: Richard (congacx)
Component: network-wirelessAssignee: drivers_network-wireless (drivers_network-wireless)
Status: CLOSED INSUFFICIENT_DATA    
Severity: normal CC: alan, htl10, linville
Priority: P1    
Hardware: All   
OS: Linux   
Kernel Version: 2.6.27.7 Subsystem:
Regression: No Bisected commit-id:

Description Richard 2008-12-01 09:38:53 UTC
Earliest failing kernel version: 2.6.27.* 

Distribution: Arch Linux x86_64

Software: rtl8187b module

Hardware: Netgear WG111v3 wireless usb adapter

Problem Description: When I connect to my wireless router using my usb adapter (Netgear WG111v3) and wpa-psk security it connects fine. All downloading (firefox, torrent, dc etc) then works fine the first 30 seconds (max speed) then it drops drasticaly to a cap around 130kbps. 
If I close the connection and then start it again the same happens, eg. works fine for around 20 seconds then drops.

So far I have tried connecting with netcfg2, wicd, networkmanager. I've also tried to change to g only mode in the router, But it makes no difference,
Comment 1 Hin-Tak Leung 2008-12-09 17:23:02 UTC
There are some known issues with rate control with earlier mac80211 - could you see if the latest compat-wireless make it better for you?
http://linuxwireless.org/en/users/Download
Comment 2 Richard 2008-12-10 22:09:43 UTC
Installed the latest compat-wireless and in fact, it works much better.
The connection stays stable for long periods (at max speed). 

But once in a while it drops. Though it happens very seldom compared to how it was before. And also, I can't se any pattern to when it drops as I did before.
Comment 3 Hin-Tak Leung 2008-12-11 04:22:12 UTC
(In reply to comment #2)
> But once in a while it drops. Though it happens very seldom compared to how
> it
> was before. And also, I can't se any pattern to when it drops as I did
> before.

Can you describe more about "it drops"? What do you mean my that?
Comment 4 Richard 2008-12-11 22:09:05 UTC
The same as before, it gets capped to around 130kbps. 
I'm trying to find a connection to my own activity, but since it have only happened four times since your suggested and very random, I haven't founda ny pattern. And nothing in the logs that makes sence to me.
Comment 5 Hin-Tak Leung 2008-12-12 22:26:07 UTC
1) how do you measuring your throughput? This is related to my earlier question ("what do you mean by "it drops"?" which you have not answered). 
Comment 6 Richard 2008-12-13 01:32:25 UTC
Im not shure what you mean by your question.

The problem is the same as in my first post. I have a 10/10MB connection at home. And if I start to dowload stuff, either via Firefox, dcpp, torrent etc, the downloadspeed begins downloading at my lines maximum speed. But after a while the speed drops to around 130KiB/s and stays there until i restart the interface (wlan0). 

The way I measure is either by the builtin interface of firefox, the torrent program, or any other networkmonitor (like bungmeter etc.).

I would be happy to give all the info you need, if you can show me how to collect it.

Thnx for helping out and all your patience.
Comment 7 Hin-Tak Leung 2008-12-13 03:26:48 UTC
How you are measuring is a bit wrong, and that's why I asked, twice.

Downloading *through* your wireless access point from an external party depends on traffic shaping policy of your ISP, and connectivity from your ISP to your download source. 

Can you just run wget or sftp between your two end points (i.e. don't involve anything outside your house), or two machines *within your house*? firefox/torrent are no good in this discussion. 
Comment 8 Richard 2008-12-13 04:40:31 UTC
It's not an ISP related problem since the problem don't occour on my other computer (an eepc with Ubuntu eee.). 

But if you can point me in the right direction on how to use wget to fetch files from my other computer I can try that.
Comment 9 Hin-Tak Leung 2008-12-13 05:03:30 UTC
Again, how do you know it does not 'occur on my other computer'...

wget requires that you have an ftp/web server on one side. If you have not had experience with setting up a web/ftp server and don't have one handy, sftp between two of your own computer is an alternative. sftp works like command-line ftp except it goes through ssh so is more likely to be on-by-default and does not require set up. (...this is the kernel bugzilla and if you need general set-up/usage advice, more than the name of the tools to use, you really should be approaching your distro...) both wget and sftp has a progress meter as it runs. 
You just need to use either to transfer some big file and see what the progress meter says.
Comment 10 Richard 2008-12-13 11:45:33 UTC
Dusted of a server I had standing with vsftp setup on it.
Logged in to the server via ssh and downloaded a debian iso from the internet (147Mb) using wget at full speed (as I said, no problem with the ISP).

Then I used wget from my computer (the one that have the problem) to dowload the debian iso from my server and the speed was capped to 135K/s.
But I don't see how wget could give any more info other than that the speed is capped?
Comment 11 Hin-Tak Leung 2008-12-13 14:03:42 UTC
Wget reports in bytes - and your initial report says 130 kbps. (that 8 times less if one reads that as kbit per sec). 135KByte/s is a little over 1Mbit/s .

On my system, external wget max at about 230KByte/s (due to my cable ISP capping at 2Mbit, which is exactly what the service I bought) and about 450KByte/s internal (due to access point operating at 11b mode). 

135kByte/s is a bit low - theoretically for 11g, you could get as high as >1MByte/s - but if you have any 11b client, your whole network is degraded and you would only get 11b speed, which is only about 3x that; so your speed is a bit low (maybe 15% to 30% to what it could be) but not excessively so.

Now you mentioned that your eepc "does not have this problem". What number does your eepc get, doing the exact same thing?   
Comment 12 Richard 2008-12-13 14:31:51 UTC
Now I understand what the missunderstadning was =)
Sorry for mixing KByte/s and kbps. 

My eeepc gives an average speed of 2.23MB/s when using wget to fetch the iso from my server.
Comment 13 Hin-Tak Leung 2008-12-13 14:50:28 UTC
okay, 2.23MB/s (=18Mb/s) is quite optimal of 11g network. So the next question is,
how often does the rtl8187b drops to 1Mbit, and when it does, what does iwconfig says.

Do you have a graphical display which display the throughput over a small period as graphs - e.g. xnetload, nload, or gnome's system monitor? What I want to know is if your low throughput is from a continuous-but-low rate or due to widely-fluctuating rates.
Comment 14 Richard 2008-12-13 15:18:40 UTC
It usually drops within 1 minute from when I start the wlan0. But it seems random because some times it last for several minutes up to an hour.

When it happened the graph dropped to a continuous low one. The output from iwconfig on wlan0 is:

wlan0     IEEE 802.11bg  ESSID:"theworld"  
          Mode:Managed  Frequency:2.427 GHz  Access Point: 00:1E:2A:7B:89:5A   
          Bit Rate=11 Mb/s   Tx-Power=27 dBm   
          Retry min limit:7   RTS thr:off   Fragment thr=2352 B   
          Power Management:off
          Link Quality=50/100  Signal level:-46 dBm  
          Rx invalid nwid:0  Rx invalid crypt:0  Rx invalid frag:0
          Tx excessive retries:0  Invalid misc:0   Missed beacon:0

The only thing that changed from before the drop was the link quality and signal.
Comment 15 Hin-Tak Leung 2008-12-13 15:37:22 UTC
50/100 for link-quality is a bit low, if you are using the latest wireless-testing/compat-wireless. (the link-quality code has changed a few times since 2.6.27).

One thing you can try is to "drop" the bit rate - with "iwconfig wlan0 rate 5.5M"
to see if you can get the throughput back immediately. Dropping the rate sometimes works better in the presence of interference. Do you have domestic appliances near by - e.g. microwave oven, cordless phone?
Comment 16 Richard 2008-12-13 15:55:35 UTC
Dropping the bit rate did'nt make any difference.
And yes, I have a cordless phone next to the computer.
Comment 17 Hin-Tak Leung 2009-01-05 11:36:35 UTC
can you try some of the tips (various, both code changes and some diagnostic
tips) in this thread of discussion?
http://www.spinics.net/lists/linux-wireless/index.html#26236
Comment 18 Alan 2010-01-25 14:08:05 UTC
No response so closing stale bug