On 2016-04-06 19:07, Ruediger Meier wrote:
> On Wednesday 06 April 2016, Patrick Shanahan wrote:
>> * Ruediger Meier <sweet_...@gmx.de> [04-06-16 10:45]:
>>> Hi,
>>>
>>> Since a few weeks I see nscd running crazy on 13.1, like this
>>>
>>> USER      PR  NI    VIRT    RES    SHR S  %CPU  %MEM     TIME+
>>> COMMAND nscd      20   0 5265008 1.626g    652 S 0.000 5.185  
>>> 0:30.32 nscd
>>>
>>> I guess 1.6G would be enough to cache all existing zones worldwide.
>>> What could be the problem?
>>
>> odd, mine has been up 261 days and:

top - 19:09:40 up 21 days,  6:32, 17 users,  load average: 0,23, 0,19, 0,14
Tasks: 235 total,   1 running, 234 sleeping,   0 stopped,   0 zombie
%Cpu(s):  4,9 us,  1,3 sy,  0,0 ni, 92,2 id,  1,6 wa,  0,0 hi,  0,1 si,  0,0 st
KiB Mem:    500268 total,   492224 used,     8044 free,    42408 buffers
KiB Swap:  6143996 total,   147840 used,  5996156 free,   283076 cached

  PID USER      PR  NI    VIRT    RES    SHR   SWAP S  %CPU  %MEM     TIME+ 
COMMAND

 1250 nscd      20   0  188520    868    584    948 S 0,000 0,174   0:12.78 nscd

AmonLanc:~ # uname -a
Linux AmonLanc 3.12.53-40-default #1 SMP Thu Feb 25 06:26:23 UTC 2016 (b2ce64e) 
i686 i686 i386 GNU/Linux
AmonLanc:~ # 


> 
> Could you show me your stats? I wonder if you have some reasonable cache 
> hit rates.
> $ nscd -g

These are mine.

nscd configuration:

              0  server debug level
 21d  6h 33m  4s  server runtime
              5  current number of threads
             32  maximum number of threads
              0  number of times clients had to wait
             no  paranoia mode enabled
           3600  restart internal
              5  reload count
passwd cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
           3296  used data pool size
            600  seconds time to live for positive entries
             20  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
           1739  cache misses on positive entries
             28  cache misses on negative entries
              0% cache hit rate
             36  current number of cached values
             44  maximum number of cached values
              2  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/passwd for changes

group cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
           1024  used data pool size
           3600  seconds time to live for positive entries
             60  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
            735  cache misses on positive entries
              0  cache misses on negative entries
              0% cache hit rate
             14  current number of cached values
             42  maximum number of cached values
              1  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/group for changes

hosts cache:

            yes  cache is enabled
             no  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
            512  used data pool size
            600  seconds time to live for positive entries
              0  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
            801  cache misses on positive entries
              0  cache misses on negative entries
              0% cache hit rate
              4  current number of cached values
             31  maximum number of cached values
              2  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/hosts for changes

services cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
            968  used data pool size
          28800  seconds time to live for positive entries
             20  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
             73  cache misses on positive entries
             75  cache misses on negative entries
              0% cache hit rate
              9  current number of cached values
             98  maximum number of cached values
              3  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/services for changes

netgroup cache:

            yes  cache is enabled
            yes  cache is persistent
            yes  cache is shared
            211  suggested size
         216064  total data pool size
              0  used data pool size
          28800  seconds time to live for positive entries
             20  seconds time to live for negative entries
              0  cache hits on positive entries
              0  cache hits on negative entries
              0  cache misses on positive entries
              0  cache misses on negative entries
              0% cache hit rate
              0  current number of cached values
              0  maximum number of cached values
              0  maximum chain length searched
              0  number of delays on rdlock
              0  number of delays on wrlock
              0  memory allocations failed
            yes  check /etc/netgroup for changes


No hits at all, all misses on all sections. :-?



>> but I am still on kernel-desktop-3.11.10-29.1.x86_64
>>                nscd-2.18-4.44.1.x86_64
> 
> I assume that it has something to do with recent updates (kernel, 
> systemd?).

Mine is updated, I think. At least on those two. I have these pending (zypper 
patch):

  MozillaThunderbird bind-libs bind-utils libgif6 openssh timezone 
timezone-java 


> Maybe my NIS setup is also a bit unusual but this is the 
> reason why I run nscd at all.
> 
> Anyways it's for sure a bug. It should never use much more than
> (5 * 32M) = 160M:

That would be a huge lot for me, in that machine: 0.5GiB RAM total.


> $ grep max-db /etc/nscd.conf
> #       max-db-size             <service> <number bytes>
>         max-db-size             passwd          33554432
>         max-db-size             group           33554432
>         max-db-size             hosts           33554432
>         max-db-size             services        33554432
>         max-db-size             netgroup        33554432
> 
> 
> I really hate that nscd. I've had also problems with it a few years ago 
> on 11.4. (crashs, 100% CPU, ...). I wonder why the glibc people do not 
> fix it. Instead they have added a "paranoia" mode to restart it 
> regularly:
> http://serverfault.com/questions/463648/why-would-nscd-use-a-huge-amount-of-ram
> 
> I'll try /etc/nscd.conf:
>         paranoia                yes
>         restart-interval        3600

Oh. I wondered what that was.

-- 
Cheers / Saludos,

                Carlos E. R.
                (from 13.1 x86_64 "Bottle" at Telcontar)

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Evergreen mailing list
Evergreen@lists.rosenauer.org
http://lists.rosenauer.org/mailman/listinfo/evergreen

Reply via email to