Solaris Performance

Dear All,

I have Sun OS 5.10 Solaris OS running.

SunOS **** 5.10 Generic_118833-36 sun4v sparc SUNW,Sun-Fire-T200

++There is a process named nscd utilizing high cpu not 100 though. Due to this the printer are delayed in printing and retreving information from this server

last pid: 21848;  load avg:  8.28,  8.42,  8.36;       up 41+19:28:17  16:57
291 processes: 285 sleeping, 6 on cpu
CPU states: 51.2% idle, 18.1% user, 30.7% kernel,  0.0% iowait,  0.0% swap
Memory: 16G phys mem, 5032M free mem, 8005M total swap, 8005M free swap

   PID USERNAME LWP PRI NICE  SIZE   RES STATE    TIME    CPU COMMAND
 16785 root      34  10    0 5016K 4504K cpu/9  136:36 29.22% nscd
 16904 root       1  22    0 5944K 5200K cpu/5    8:44  1.90% xprtlc
 16899 root       1  21    0 5944K 5200K sleep    8:43  1.90% xprtlc
 16903 root       1  21    0 5944K 5200K sleep    8:42  1.89% xprtlc
 16906 root       1  22    0 5944K 5200K cpu/13   8:43  1.88% xprtlc
 16905 root       1  22    0 5944K 5200K sleep    8:41  1.88% xprtlc
 16902 root       1   1    0 5944K 5200K cpu/9    8:41  1.87% xprtlc
 16901 root       1  21    0 5944K 5200K sleep    8:42  1.87% xprtlc
 16900 root       1  22    0 5944K 5200K sleep    8:42  1.87% xprtlc
 16898 root       1  22    0 5944K 5200K cpu/14   8:41  1.86% xprtlc
  8097 rf42       1  59    0 3457M 3191M sleep    0:07  0.19% oracle
 21834 root       1  49    0 3200K 2384K cpu/4    0:01  0.12% top
  1176 root       6  59    0 9432K 1064K sleep  736:13  0.07% elxhbamgr
  3076 rf14       1  59    0 3456M 3190M sleep    0:15  0.04% oracle
  8095 rf42       1  59    0   27M   21M sleep    0:01  0.03% rfprocemu

++Why is it nscd utilizing high resources? When i Kill it, it re-spawns a new nscd process

++When I do truss on the process it checks ipnodes,hosts file and does nothing:

/27:    stat("/etc/inet/ipnodes", 0xFD679CF0)           = 0
/28:    door_return(0xFD579DE0, 68, 0x00000000, 0)      = 0
/24:    lwp_park(0x00000000, 0)                         = 0
/28:    time()                                          = 1398117520
/24:    stat("/etc/inet/ipnodes", 0xFD979CF0)           = 0
/28:    stat("/etc/hosts", 0xFD579CF8)                  = 0
/24:    door_return(0xFD979DE0, 68, 0x00000000, 0)      = 0
/27:    lwp_unpark(24)                                  = 0
/24:    time()                                          = 1398117520
/27:    door_return(0xFD679DE0, 68, 0x00000000, 0)      = 0
/24:    stat("/etc/hosts", 0xFD979CF8)                  = 0
/27:    time()                                          = 1398117520
/24:    door_return(0xFD979DE8, 68, 0x00000000, 0)      = 0
/27:    stat("/etc/hosts", 0xFD679CF8)                  = 0
/24:    time()                                          = 1398117520
/28:    door_return(0xFD579DE8, 68, 0x00000000, 0)      = 0
/24:    stat("/etc/inet/ipnodes", 0xFD979CF0)           = 0
/28:    time()                                          = 1398117520
/24:    door_return(0xFD979DE0, 68, 0x00000000, 0)      = 0
/28:    stat("/etc/inet/ipnodes", 0xFD579CF0)           = 0
/24:    time()                                          = 1398117520
/29:    door_return(0xFD479DE8, 68, 0x00000000, 0)      = 0
/24:    stat("/etc/hosts", 0xFD979CF8)                  = 0
/29:    time()                                          = 1398117520
/28:    door_return(0xFD579DE0, 68, 0x00000000, 0)      = 0
/29:    stat("/etc/inet/ipnodes", 0xFD479CF0)           = 0
/28:    time()                                          = 1398117520
/24:    door_return(0xFD979DE8, 68, 0x00000000, 0)      = 0
/29:    door_return(0xFD479DE0, 68, 0x00000000, 0)      = 0
/24:    time()                                          = 1398117520
/29:    time()                                          = 1398117520
/24:    stat("/etc/inet/ipnodes", 0xFD979CF0)           = 0
/28:    stat("/etc/hosts", 0xFD579CF8)                  = 0
/24:    door_return(0xFD979DE0, 68, 0x00000000, 0)      = 0
^C/28:  lwp_unpark(29)                                  = 0
/29:    lwp_park(0x00000000, 0)                         = 0
/34:    door_return(0xFCEF9DE8, 68, 0x00000000, 0)      = 0
/28:    door_return(0xFD579DE8, 68, 0x00000000, 0)      = 0
/30:    time()                                          = 1398117520
/27:    door_return(0xFD679DE8, 68, 0x00000000, 0)      = 0
/24:    time()                                          = 1398117520
/33:    door_return(0xFCFF9DE8, 68, 0x00000000, 0)      = 0
/26:    door_return(0xFD779DE8, 68, 0x00000000, 0)      = 0
/31:    door_return(0xFD279DE8, 68, 0x00000000, 0)      = 0

++How do i kill this process and reduce performance issue.

Regards,
Sunil.

What happens after a reboot of the system or a restart of the nscd service? How is your nscd.conf file looking?

# cat /etc/nscd.conf
#
# Copyright (c) 1994-2001 by Sun Microsystems, Inc.
# All rights reserved.
#
#ident  "@(#)nscd.conf  1.6     01/01/26 SMI"
#

#
#       Currently supported cache names: passwd, group, hosts, ipnodes
#           exec_attr, prof_attr, user_attr
#

#       logfile                 /var/adm/nscd.log
#       enable-cache            hosts           no

        debug-level             0

        positive-time-to-live   passwd          600
        negative-time-to-live   passwd          5
        suggested-size          passwd          211
        keep-hot-count          passwd          20
        old-data-ok             passwd          no
        check-files             passwd          yes

        positive-time-to-live   group           3600
        negative-time-to-live   group           5
        suggested-size          group           211
        keep-hot-count          group           20
        old-data-ok             group           no
        check-files             group           yes

        positive-time-to-live   hosts           3600
        negative-time-to-live   hosts           5
        suggested-size          hosts           211
        keep-hot-count          hosts           20
        old-data-ok             hosts           no
        check-files             hosts           yes

        positive-time-to-live   ipnodes         3600
        negative-time-to-live   ipnodes         5
        suggested-size          ipnodes         211
        keep-hot-count          ipnodes         20
        old-data-ok             ipnodes         no
        check-files             ipnodes         yes

        positive-time-to-live   exec_attr       3600
        negative-time-to-live   exec_attr       300
        suggested-size          exec_attr       211
        keep-hot-count          exec_attr       20
        old-data-ok             exec_attr       no
        check-files             exec_attr       yes

        positive-time-to-live   prof_attr       3600
        negative-time-to-live   prof_attr       5
        suggested-size          prof_attr       211
        keep-hot-count          prof_attr       20
        old-data-ok             prof_attr       no
        check-files             prof_attr       yes

        positive-time-to-live   user_attr       3600
        negative-time-to-live   user_attr       5
        suggested-size          user_attr       211
        keep-hot-count          user_attr       20
        old-data-ok             user_attr       no
        check-files             user_attr       yes

++Above is nscd.conf file after nscd re-start

Regards,
Sunil

You can disable nscd with

svcadm disable svc:/system/name-service-cache:default

But I fear this won't improve performance (or make it worse).
There is too much time spent in the kernel (%sys).
Apply a patch cluster!

I re-started nscd daemon. The performance is improved now.

Thanks for yor help Germany..