[CentOS] Slow DNS lookups on CentOS6

Tue Sep 27 17:28:19 UTC 2011
Alfred von Campe <alfred at von-campe.com>

On Sep 27, 2011, at 11:29, John Hodrien wrote:

> You probably want to do an strace -f host blah rather than a basic strace, or
> I think you'll lose what's going on.

Good point.  Using -f doesn't show a 3+ second gap, but I still have no idea
why it's slow (3-5 seconds) compared to CentOS5, or why using ltrace causes
host or nslookup to crash.  Can anybody else get ltrace to work with host?

> Are you running either sssd or nscd on your box?

Yes, I am running nscd, but I didn't think it cached DNS queries.

> I've done nothing special, and DNS seems fast enough.

And I have done nothing different than what I do in CentOS5, yet it is much
slower (by at least an order of magnitude).

On Sep 27, 2011, at 13:05, Frank Cox wrote:

> Have you considered installing dnsmasq on those machines?

No, this is in a corporate environment, and the queries that are slow are
for names outside of our domain (i.e., the Internet), so I don't think it
would help.

Any other ideas on how to diagnose the root cause?

Alfred