You are not logged in.

#1 2012-07-22 02:04:45

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Huge network latency on Linux... Fine on Windows. Router issue?

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 2.6.37.6 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. smile 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)

Offline

#2 2012-07-22 16:15:15

ewaller
Administrator
From: Pasadena, CA
Registered: 2009-07-13
Posts: 19,739

Re: Huge network latency on Linux... Fine on Windows. Router issue?

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
Sometimes it is the people no one can imagine anything of who do the things no one can imagine. -- Alan Turing
---
How to Ask Questions the Smart Way

Offline

#3 2012-07-22 16:29:44

saharchie
Member
Registered: 2008-09-17
Posts: 20

Re: Huge network latency on Linux... Fine on Windows. Router issue?

Have the speed / duplex settings been investigated?  Mismatches could be causing the slow performance.

Offline

#4 2012-07-22 19:46:23

Terminator
Member
From: Belgium
Registered: 2012-05-07
Posts: 265

Re: Huge network latency on Linux... Fine on Windows. Router issue?

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.

Offline

#5 2012-07-22 19:49:30

Gullible Jones
Member
Registered: 2004-12-29
Posts: 4,863

Re: Huge network latency on Linux... Fine on Windows. Router issue?

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. smile

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...

Offline

#6 2012-07-23 04:12:12

piffey
Member
From: Sioux Falls, SD
Registered: 2009-10-07
Posts: 54

Re: Huge network latency on Linux... Fine on Windows. Router issue?

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:

208.67.222.222
208.67.220.220

Offline

Board footer

Powered by FluxBB