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:

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


> USER       PID %CPU %MEM    VSZ   RSS TTY      STAT START   TIME
> COMMAND nscd      2785  0.0  0.1 1001076 11276 ?       Ssl  Feb24 
> 16:59 /usr/sbin/nscd --foreground
>
> 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?). 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:

$ 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

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

Reply via email to