about a month ago my two fedora systems at work (8 and 9) started making very slow internet connections (not 100% of the time, but pretty consistently...and specifically web pages through firefox). i had recently moved cubes, so at first i theorized it was my network drops in the new cube and there was nothing i could do about it. however, my mac mini didn't seem to exhibit the problem. i wondered if it was failing hardware or something goofy in a yum update, so i booted off an ubuntu live cd (8.10). but it exhibited the same problem.
in all cases, pings were just fine. also, inexplicably, streaming internet radio worked just fine (such as somafm.com -- the best online radio around).
after a few weeks of this, i finally broke down and went to talk to a couple of guys in networks. that's when i learned that fedora systems all over our network were exhibiting this problem. including the new fedora 10 (which i haven't installed yet), and some other linux distros. they provided some theories, but had no solutions.
learning that this was a wider problem, i decided to try and do a bit of google searching to see if there were any possible solutions online. with just the slightest bit of google-fu i was able to come up with a suggestion, which led to a couple of other suggestions.
the first was to disable ipv6 on firefox. to do this:
- open firefox
- in the url/address bar, type "about:config"
- at this point, some firefox version may warn you. click ok.
- in the filter bar at the top, search for ipv6
- you should see "network.dns.disableIPv6 (by default it is set to false)
- right click on the line and choose "toggle" (or double-click on the line)
- it should now be set to "user set" and "true"
- close and re-open firefox
before i did this, i was getting download speeds of around 0 to 2 kb/s. this didn't really seem to help much. but i don't use ipv6 anyway, so it shouldn't hurt me.
the next suggestion was a little more drastic, but worth a shot: edit /etc/sysctl.conf
and add the following lines:
# control tcp windows scaling
net.ipv4.tcp_window_scaling = 0
i set this and rebooted my box. my download speeds went to between 500 to 1300 kb/s. obviously this solved the problem. this worked on both of my fedora systems (8 and 9).
looking back on it, a network change that caused problems with tcp would explain why pings (icmp) and streaming internet radio (udp) were unaffected while http (tcp) was knocked around. now if i can figure out what happened on the network...
a guy in my group who used to work at rice university said they had some similar problems with redhat systems back in the day when people started switching over from the 2.4 kernel to the 2.6 kernel.
a little more google-sleuthing came up with this page. it appears setting tcp window scaling off might be a bit heavy handed. earlier versions (2.4) of the kernel had the setting on but had smaller max values. so it is possible that setting the rmem and wmem values might fix the problem without being as heavy handed.
then again, i'm not sure i feel like toying with it. i can load web pages and stream video again without issue, so i may be placated enough. plus i think the network guys may have identified the problem and may be pushing a patch that will possibly solve the problem. (of course, that's a lot of maybes.)
(thanks to google and this post on the fedora forum.)