Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I have DNSMasq set up on a relatively idle Pentium D 3.4Ghz Debian Linux machine. When I run dig queries locally, the second result is always 0 ms. When I run dig queries on any other machine on my network, the cached response time is a constant 35ms. This is in spite of the fact that I get LAN ping times back -- under 1ms.

Using DNS Benchmark, I ran a test that shows I can hit my ISP's DNS servers faster than my own for cached queries.

How am I accruing 35ms on cached DNS responses for remote queries but <1ms for local queries at the server's command prompt?

share|improve this question
What is the resource usage on the dnsmasq server when you are testing the cache response time? Is the machine swapping? – Andrew B Jan 13 '13 at 19:12
Can you add your dnsmasq.conf? Also, from the test machines, are you querying directly (e.g., dig @ If you're not querying directly, please add the test machines' resolv.conf. – Belmin Fernandez Jan 13 '13 at 21:59

I suspect this due to a low amount of memory on your local DNS server and it reading the cache DB entry for the name from the disk causing a slower response time. It could also be a poor quality network card causing a large amount of CPU usage... I would monitor the system resources when you do a look up from the host.

Check to see how much memory is free using the "free" command, you can do "free -h" for a more human readable output.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.