Subject: Re: Why so darn slow... Reverse DNS lookups
To: Bruce Lane <kyrrin@bluefeathertech.com>
From: David Maxwell <david@vex.net>
List: port-sparc
Date: 01/05/2001 11:59:35
On Fri, Jan 05, 2001 at 07:51:58AM -0800, Bruce Lane wrote:
> 	I've noticed some odd behavior with both 1.4.2 and 1.5 on the pair of
> SPARC LX's/Classics I've got as my mail/web servers. Specifically,
> molasses-like response time when attempting to connect with telnet or my
> mail client.
> 
> 	The problem: If the machine has been sitting idle for a while, and I fire

> lightning-swift until I let things sit idle for an hour or so, then I have
> to go through the delay again.

It's reverse DNS lookups. When you connect, your NetBSD box wants to figure 
out the NAME that goes with the IP that is asking to connect. Once it
caches that information, connections will be fast, until the cache entry is 
timed out ("idle for an hour or so") - then the first connect will be slow again.

Confirm the following:

Nameservers in /etc/resolv.conf
PTR DNS records for the host IPs you're connecting from.

Alternately, add entries in /etc/hosts, and make sure /etc/nsswitch.conf
tells your resolver to use /etc/hosts (files) before resorting to DNS.
(hosts:                files, dns, nis)
This will need to be done on every host. Better yet, fix your DNS :-)

-- 
David Maxwell, david@vex.net|david@maxwell.net -->
If you don't spend energy getting what you want,
	You'll have to spend it dealing with what you get.
					      - Unknown