nscd uses 100% cpu
Ok, 7 years later, seems I found at least one condition when nscd
shows suchlike behaviour - check whether you have space left on root partition.
Looks like, when there is no space left nscd
uses all the file descriptors system provides and falls into condition of 100% CPU usage
Related videos on Youtube
![ktm5124](https://i.stack.imgur.com/q9l9m.jpg?s=256&g=1)
Comments
-
ktm5124 almost 2 years
I'm working on a linux box and the output of
top
reveals that the commandnscd
(usernscd
) is using 100% of CPU.I'm uploading a flat file to MySQL from this box, and it is taking a long time (albeit it is a very large file)... I am curious whether
nscd
could be slowing it down by hogging all the CPU.That said, I'm puzzled as to why anything could be working with a process taking 100% of CPU... because, after all, I am running bash scripts, perl scripts, and bash commands fine notwithstanding.
Is this a known problem with
nscd
? Is it actually hogging 100% ofCPU
as top reports?-
jordanm over 11 yearsNo, it's not normal for
nscd
to peg a CPU core. Are you sure it's reallynscd
and not something disguised as it? What doesstrace
show that it's doing? -
phemmer over 11 yearsI haven't used nscd in years as it's always caused numerous weird and system-breaking issues. One thing you can try is shutting nscd down, removing it's cache data (I think it's in
/var/lib/nscd/db
on most distros), and then starting it back up. That always seemed to get it working again. -
daisy over 11 yearsI've experience similar issues, just restart it
-
Jenny D over 11 yearsThe last time I saw anything like that was on a server that had more than a million users in /etc/passwd; it would do that when you added more users to it. If that's not the case here, I'll join the choir singing "restart nscd".
-