On Tue, Jul 27, 2010 at 3:35 PM, Ralph Mack <ralphm...@comcast.net> wrote: > I was just doing a little looking into why a web site I'm working on was > a bit sluggish coming up and Firebug > informed me that the bulk of the time is getting tied up in DNS > resolution. It looks like each resolution is > taking either 1 or 2 seconds, even for localhost! Since the web page has > three tiers of files referring to other files, > that leads to a web site that loads in half a second if accessed through > its IP (127.0.0.1) but is taking over > seven seconds if referred to by name (localhost). > > I'd have thought localhost would resolve on my local hosts table without > even bothering to ask anybody else. > Does it go out to the external servers before looking closer to home? > (Seems backwards.) Even if it did that, > I'd expect some kind of local name caching behavior to kick in. How > should I troubleshoot this? > > All of my DNS resolution is through Comcast. I have no DNS inside the > firewall. My network is the usual > family workgroup, with Windows, Linux, Mac wired together and the flock > of enigmatic gadgets on wi-fi > that has now become a standard affair. For the one or two machines we > all talk to I use static hosts table > entries.
You don't say which OS you're working on but since you emailed a GNHLUG list I'm going to assume Linux. :-) What does your /etc/nsswitch.conf contain on the hosts line? On one of my machines (Ubuntu 8.04.3 LTS) it looks like this: hosts: files mdns4_minimal [NOTFOUND=return] dns mdns4 The important thing for our purposes is that 'files' appears before 'dns', so that the resolver looks at your /etc/hosts before looking to DNS. > I've had other problems where DNS drops out entirely for minutes at a > time but the network otherwise > appears to be fine - pings to IPs, etc. work. Since it affects all the > machines here, I figured it was either my > router or Comcast DNS. Now I don't know what to think. What would be > useful, though, is to know > how to troubleshoot that as well. No clue about this one. -- Roger _______________________________________________ gnhlug-discuss mailing list gnhlug-discuss@mail.gnhlug.org http://mail.gnhlug.org/mailman/listinfo/gnhlug-discuss/