Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

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
1  
Can you add your dnsmasq.conf? Also, from the test machines, are you querying directly (e.g., dig microsoft.com @192.168.1.1)? If you're not querying directly, please add the test machines' resolv.conf. –  Belmin Fernandez Jan 13 '13 at 21:59
add comment

1 Answer

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
add comment

Your Answer

 
discard

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.