For the past two weeks or thereabouts, internet access on my Linux machines has been really laggy. Firefox can spend 20-30 seconds "looking up" each website. Once the website has been "looked up," things are usually faster, but not always and not by much. Also, package managers take a long time to connect, and bandwidth seems lower than it should be (i.e. I get 150-200 Kbps on what should be a 400 Kbps connection).
This happens on several different Linux distros, with kernels ranging from 22.214.171.124 to 3.4.5.
At first I thought that this was an IPv6 thing, since turning off IPv6 on the afflicted machines seemed to help a bit... But the apparent improvement disappeared quickly. Seems as though it was some sort of fluke. But what's really weird is that Windows does not suffer from this at all, again regardless of version. Windows 2000 gets the same bandwidth and latency as Windows 7 - that is, the full 400 Kbps and no perceptible latency at all.
Also bizarre: ping latency is the same on Linux and Windows. However, sending three pings on Windows takes three seconds; doing the same on Linux takes fifteen, during which 'ping' is slow to respond to termination signals.
Even more bizarre: looking at my router's statistics, my Linux boxen are getting a new DHCP lease regularly, once every 4-6 minutes. Other machines are getting new DHCP addresses once a week, which is what the router is set to do.
I'm pretty sure at this point that the problem is with the router, a cheapo Dynex model which has to be 7 or 8 years old by now - because the lag is also present when connecting to the router! But I don't know exactly what the problem is. I would appreciate any advice on this...
(Well, except advice to get a new router. That's probably a good idea, but not something I can do right now.)
Last edited by Gullible Jones (2012-07-22 02:05:03)
Not a solution, but have you tried a different DHCP client? If you are using dhcpcd, then try dhclient; or vice-versa.
I was going to suggest DD-WRT for your router, but the forums over there indicated your Dynex (a rebranded Belkin) is not compatible.
Also, make sure you have your /etc/hosts file set up correctly with your host name.
You might also try configuring the system to use a different DNS server - the one in your router could cause issues.
Nothing is too wonderful to be true, if it be consistent with the laws of nature -- Michael Faraday
Like you, I have no idea what you are doing, but I am pretty sure it is wrong...Jasonwryan
How to Ask Questions the Smart Way
Have the speed / duplex settings been investigated? Mismatches could be causing the slow performance.
Do you use a wireless or wired connection? My guess is that the linux drivers for your wireless or ethernet card are causing the latency.
Thanks very much for the swift replies...
It turns out this is indeed a DNS issue. I've worked around it (for now) on my netbook by using resolv.conf.head to switch to Google's DNS servers, and now everything is spectacularly fast.
(Assuming there's no serious downside, I may switch the router to Google DNS. I suspect that would avoid a lot of problems I've had with my ISP, and I'm not doing anything that makes me particularly worried about Google spying on me, so...)
It would still be interesting to figure out exactly what is wrong though. Possible explanations are welcome.
P.S. Re DD-WRT, I've been thinking of converting a Pentium II Thinkpad into a dedicated gateway, probably using Debian or something based on it. Don't have the time now, but I might in a couple weeks...
I had the same issues and it turned out to be a DNS issue with my ISP's DNS as well. If you are worried about Google's DNS servers, you can always switch to OpenDNS. I find them to be just as fast and their policies are a little more to my liking. Server for you: