[SunHELP] The word on the street about nscd

Sreenivasa Rao Vadalasetty sunhelp at sunhelp.org
Wed Jun 27 00:34:33 CDT 2001


Hi,
I seem to be having better performance when nscd is disabled for hostname
look ups by editing the /etc/nscd.conf file to have the following line:
enable-cache            hosts           no

I used to have the following problem for which the above solution helped me.
Has anyone else had problem with nscd and disabled it?

Problem:  

1) Name resolution intermittently takes lot of time
			Symptoms: 
				a) (rsh or ping) <hostname> takes time while
(rsh or ping) <ipaddress of the same host> works fast.
				b)It was not found be a problem for the
hosts whose entries were in /etc/hosts file.

		Actions Taken:

			1.  Checked nsswitch.conf to find the name lookup
order as  files, dns which is what I want that to be.
2.	/etc/resolv.conf was normal.
3.	Checked /var/adm/messages, but no clues.
4.	The suspected NIC on this machine was not the problem. 
5.	Checked sizes and timestamps of resolver
libraries(lbnsl*,libresolv*)on this machine, and on a working machine.
Everything normal.
6.	Tried snoop on this machine when there was a problem. No clue.
7.	Enabled DNS debugging and observed whether named took time. Named
response was normal and fast enough(nslookup confirmed this observation).
Thus, the name resolution problem should be prior to reaching DNS during the
resolv order.
8.	Gone through the name resolution process again and started
suspecting nscd(the name server caching daemon) itself. As it was
intermittent, there were all possibilities that there could be a problem in
nscd as it does not maintain static data. And having nscd stopped, name
resolution seemed to be working fine. 

				Fortunately, there was a statement in the
book "DNS and BIND":
				"Sun's intent with nscd was to speed up
performance by caching frequently-looked-up names. Unfortunately word on the
street is that nscd sometimes slows DNS lookups and many people disable
it..... If you are not convinced of nscd's usefulness, at least with DNS
lookups, you can use:
				enable-cache hosts no
				to turn caching off for the hosts database."

	I have implemented this on my machine and I don't have the problem
anymore.

Thanks.



More information about the SunHELP mailing list