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.)
3 comments on “got slow internet on linux (fedora, or others)?”
You are gettting a little close to blasphemy with your loss of faith in these so-called network guys.
Thanks for for the link…the last link you posted has helped me. I was having the same problem after having my FC 10 setup for about 2 months. One day my internet was ridiculously slow. But downloads were normal. The about:config method mentioned on the link is what remedied my problem.
jason: the “so-called network guys” (and gals) upgraded a module on some networking hardware and the problem went away.
evidently the network guys giveth and taketh away. i’m not sure where that’s supposed to put me as far as blasphemy and faith…
skipp: glad it helped. i wasn’t sure exactly what kind of conditions would cause ipv6 dns to be a problem, but i found this on mozilla.com which gives a bit more info:
so maybe if a network device is blackholing ipv6 traffic or creating ipv6 routes that don’t ever route correctly…sounds like there might be reason to consider a loss of faith in your network/firewall guys. 😉
(on an interesting side note, evidently firefox turns ipv6 dns resolution off by default on mac, but leaves it on for all other oses.)
i wonder if you disabled ipv6 on your computer itself instead of changing the setting in firefox if firefox would disable it too, or if it would conflict, or if it wouldn’t matter and things would work fine?