8
2
I have a Ubiquity RouterStation Pro running the latest release of OpenwRT.
Connecting via a wire directly to the router, or through a switch, I get exactly the speed I would expect, both to my local network, and to the internet. Gigabit to the the local network, and about 1.2 megabytes/second to the internet.
Connecting via a wireless G connection, I get exactly the speed I would expect from local servers, which is about 3 megabytes/second (sure, it could be better, but it isn't bad).
When I use the same exact wireless connection as above, however, and download something from the internet, my maximum speed is about 30-60 kilobytes/second. There is no significant packet loss when I use ping.
The speed tests above were taken by downloading files via http or ssh (via scp and rsync). However, using the tool iperf, which does network performance testing, I can get my full internet speed for any connection on any port, even over wireless.
I am really confused. Any help?
Edit
After some more thought, I thought the problem might be related to packet size (I saw something similar before on another network). To test this, I used ping -f -c 500 -s $SIZE
, (ie: sending pings of various size). Below a packet size of about 220, the pings had almost 0% drop rate. Above that the drop rate climbed rapidly, reaching 30% at a size of 512 bytes.
Using this data, I modified the route table on the laptop to set the MSS to 220, which as I understand it, limits the size of TCP/IP packets to about that size. Then I ran a speed test, and I get 600-700KB/s. Much better! I attribute the decreased speed compared to the wired connection to having such a pitiful packet size.
I don't consider this fixed, but just a work around. I still want to find out why this is happening, and how I can fix it.
1
What results do you get from speed testing sites like speedtest.net?
– David Schwartz – 2012-02-13T19:58:28.157speedtest.net matches the confusing http and scp performance, fast on the desktop and slow on the wireless. – Mike Cooper – 2012-02-13T20:08:13.017
@MikeCooper You may want to look at the Fragmentation Threshold on your wireless router - if you set it lower (default often 2346, depends on router), you can achieve the same effect as forcing smaller packets on the laptop, but affecting every device that connects to the router. It could be that your area is just extremely noisy. Recommended values are often multiples (fractions) of the MTU, e.g. if the MTU is 1500, maybe try a Fragmentation Threshold of 1500, 750, 375, etc. – Bob – 2012-02-16T08:55:20.077
ifconfig on OpenWRT size will show you state and settings of all interfaces. Better to increase MSS on OpenWRT, than decrease on other size – Lazy Badger – 2012-02-19T18:35:42.633
Unfortunately, this problem wasn't solved within the time limit of the bounty. If I could, I would extend it longer, but I can't. – Mike Cooper – 2012-02-23T21:48:57.573