You are not logged in.

#1 2011-12-26 11:18:42

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

dnsmasq problem - internet timeouts

I use dnsmasq as a local dns cache.  However, when my 1 Mb broadband link is downloading a large file flat out using wget, web pages timeout, and other net connected apps fail with errors such as "internet connection down?"

Pinging an internet ip address whilst the link is saturated typically results in a time=1500+ mS, but the pings do get through without loss.  However, pinging a named internet location (eg example.com), in parallel in another terminal window, results in a timeout and a "host unrecognised" type message.  As soon as the download finishes, pinging the named address becomes possible.

I've convinced myself that the dnsmasq cache is working, since using dig example.com results in an initial time of say 100 mS, followed by subsequent times of 2 mS (although I don't understand why accessing a website in a browser then using dig to access the same site doesn't immediately return a response time of 2 mS).

Any suggestions, or doesn't dnsmasq cache in the way I think its supposed to, or haven't I set it up correctly?

Offline

#2 2011-12-26 12:31:12

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: dnsmasq problem - internet timeouts

Do you experience the same problem when not using dnsmasq, for example when using a different caching dns proxy such as pdnsd or when not using a caching proxy at all?

When you are testing by pinging a named internet location, is this address already cached by dnsmasq or is it having to resolve it upstream? Have you tried with both situations?

Offline

#3 2011-12-27 01:04:12

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Re: dnsmasq problem - internet timeouts

The problem is present with no caching proxy but I've not tried pdnsd yet.

For the named internet location, the problem occurs prior to caching with dsnmasq.  Post caching it works properly, although noticeably slower than just using the ip address - hence why I've assumed the caching isn't working 100%.

Offline

#4 2011-12-27 10:55:39

b4data
Member
Registered: 2010-12-14
Posts: 141

Re: dnsmasq problem - internet timeouts

My guess would be hard drive bottlenecking and/or bandwidth saturation. Does the problem persist if you use wgets --limit-rate option?

Offline

#5 2011-12-27 11:16:36

Cotton
Member
From: Cornwall, UK
Registered: 2004-09-17
Posts: 568

Re: dnsmasq problem - internet timeouts

No - its only an issue if the connection is fully saturated.

I'd be surprised if it was disk related - if it is, then its a bigger problem than just dns caching!

Offline

#6 2011-12-27 11:55:44

Strike0
Member
From: Germany
Registered: 2011-09-05
Posts: 1,429

Re: dnsmasq problem - internet timeouts

I don't know your hardware and dnsmasq quirks, but I find b4data's guess still very plausible. If your disk is busy seeking sectors to write that download that saturates the connection, the inital dnsmasq request gets qued up for disk look up (returning the cached resolv still in 100ms if I understand your description). Subsequent requests then go faster. Sounds normal to me really,although it is strange if that significantly changes with ratelimit, yes.
Maybe you want to test with putting swap into a ramdisk as well or something.

Last edited by Strike0 (2011-12-27 11:58:20)

Offline

Board footer

Powered by FluxBB