Article ID: Q20060409-01
Q: Why DNS resolution is so slow on Linux?
A:DNS resolver on Linux is often configured to repeat failed DNS lookups in five seconds, which slows downs each of the Stone Steps Webalizer DNS resolver threads on every lookup that does not return a valid domain name by five seconds or more, depending on the number of retry attempts specified in the system DNS configuration.
In order to improve DNS resolution speed, add the following line to the system DNS resolver configuration file (/etc/resolv.conf):
options timeout:0 attempts:2
This line instructs the system DNS resolver to try to resolve IP addresses only twice and without any delay between the attempts.