Solaris 9: nscd and nscd.conf - High cpu use.

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Ed » Fri, 10 Feb 2006 04:00:34



I have a server that ncsd daemon run and it process causes a elevation
cpu's use, but the sum from cpu usage in top command isn't  100%  and
percentage idle is 0%.

This problem happen in solaris 9 and nscd.conf is default file.

Let me know:
How configure nscd.conf to the better performance according to
statistics from output "nscd -g" command?

Thanx.
Ed.

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Michael Tosc » Fri, 10 Feb 2006 04:45:49



> I have a server that ncsd daemon run and it process causes a elevation
> cpu's use, but the sum from cpu usage in top command isn't  100%  and
> percentage idle is 0%.

> This problem happen in solaris 9 and nscd.conf is default file.

> Let me know:
> How configure nscd.conf to the better performance according to
> statistics from output "nscd -g" command?

> Thanx.
> Ed.

The purpose nscd is to decrease network usage and maybe even CPU usage.

nscd is not needed, but killing it might add CPU usage to system/kernel,
and lower the overall performance.

Find out if there is a process that continuesly queries a name service
which is cached by nscd.
Or maybe it is queried over the network - then snoop will find out.

--


 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Dextho » Fri, 10 Feb 2006 05:01:38


Can you post the output of your nscd -g ? Please take 2 snapshots with
5-10mins apart and compare which of the counters/modules are getting
used more. That can help you which process/service on the host is
causing this. Accordingly you could tune your box.

Top may not show you all the processes in one terminal display. If you
want to really do the CPU match try this:
ps -eafo pcu,pid,comm|awk 'BEGIN{cputot=0}{cputot+=$1}END {print "Total
CPU:",cputot}'

You may not see it adding up to 100% coz, I/O waits may not be
accounted into process's CPU utilization.

-Dexthor.

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Darren Dunha » Fri, 10 Feb 2006 05:29:07



> You may not see it adding up to 100% coz, I/O waits may not be
> accounted into process's CPU utilization.

Well, if you're trying to add up all the process percentages, the output
in 'top', 'ps' and default 'prstat' are all the same and probably won't
come close to 100% unless things haven't started, died, or changed the
amount of usage recently (which is almost never true).

Basically, the figures have a long time component in them.  If a heavy
process exits, it takes all it's recent CPU with it in the figures, but
the remaining ones will be slow to react and the figures will not sum to
100 for a period of time.

'prstat -m' is more of an "instant" snapshot and has a better shot at
giving you a consistent image like that.

--

Senior Technical Consultant         TAOS            http://www.taos.com/
Got some Dr Pepper?                           San Francisco, CA bay area
         < This line left intentionally blank to confuse you. >

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Dextho » Sat, 11 Feb 2006 02:24:21


Thanks for the nscd output. It looks like majority of the activity in
nscd is happening in the hosts module, so something that's running on
the box is doing DNS lookups.

Is this server running a WebServer or something like that ? If so, most
of these services have options to disable "DNS lookups" on each
request. This might be the best fix.

I dont see any issue with the 99.7% cache hit rate you have on your
hosts-cache though !! Thats pretty good.

Btw, what is your nsswitch.conf (hosts) entry look like ??

-Dexthor.

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Gary Mill » Sat, 11 Feb 2006 04:29:13



Quote:>Thanks for the nscd output. It looks like majority of the activity in
>nscd is happening in the hosts module, so something that's running on
>the box is doing DNS lookups.

If you have nameservers that do caching, you can disable caching in
nscd by setting:

        enable-cache            hosts           no

in /etc/nscd.conf.  We do it this way on all of our Solaris machines.
For large tables, you can also increase the hash size in nscd.

--
-Gary Mills-    -Unix Support-    -U of M Academic Computing and Networking-

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Ed » Sat, 11 Feb 2006 04:30:48


Hi Dexthor,
Thanks again for your answer.

Yes, this server is a WebServer.
The host entry in the nsswitch.conf  as follows:

hosts:      files dns

Thanks.
Ed.

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by Dextho » Sat, 11 Feb 2006 05:41:50


Can you check your WebServer if it has DNS Lookups Enabled ? If so,
does it have Local Name Caching facility within it ? If yes, set its
size to be high enough so that you wont have problems and depending on
nscd for resolutions.

Can you live without DNS lookups on the WebServer ??

-Dexthor.

 
 
 

Solaris 9: nscd and nscd.conf - High cpu use.

Post by bart.smaald.. » Sat, 11 Feb 2006 15:24:49


Take a look at the cache size under use
and make sure that the suggested size
of the hosts table isn't less than 10 times less.

hosts cache:

       Yes  cache is enabled
    212294  cache hits on positive entries
      1539  cache hits on negative entries
     79234  cache misses on positive entries
     25929  cache misses on negative entries
      67.0% cache hit rate
         0  queries deferred
        54  total entries
       211  suggested size
      3600  seconds time to live for positive entries
         5  seconds time to live for negative entries
        20  most active entries to be kept valid
       Yes  check /etc/{passwd, group, hosts, inet/ipnodes} file for
changes
        No  use possibly stale data rather than waiting for refresh

- Bart

 
 
 

1. nscd and nscd.conf

I have an E3000 running Solaris 7.  This password file
contains about 11,000 users.  The nscd process seems to consume
a large amount of CPU time.  I called Sun to see if there were any
suggestions for tuning nscd with the nscd.conf file, and they provided
no information.  The manual pages do provide information but no good
suggestions as to which changes might enhance performance.

Are there any rules or guidelines for configuring this process or
do I have to live with the amount of CPU time it consumes?

--
#####################################---------------------------------------
#  Ed Oakes                         #        
#  Radford University               #        Office  Walker 155

#  http://www.runet.edu/~clientse   #

2. System hangs after changing Ethernet-Controller

3. ypbind and nscd run away with cpu in Solaris 8

4. compile dosemu on infomagic nov 1995

5. nscd.conf and Netscape

6. Is there an Motif compatible library?

7. nscd taking a lot of CPU time

8. rm speaks French under gnome

9. Using nscd with LDAP

10. Solaris CDE screenlock and nscd interaction?

11. nscd dynamic enable/disable not working in Solaris 8?

12. Sybase Dataservers Using High CPU after Upgrade from solaris 2.6 to 2.8

13. help me with nscd please