2

I'm working on a linux box and the output of top reveals that the command nscd (user nscd) 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% of CPU as top reports?

4
  • No, it's not normal for nscd to peg a CPU core. Are you sure it's really nscd and not something disguised as it? What does strace show that it's doing? – jordanm Mar 27 '13 at 0:35
  • 2
    I 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. – phemmer Mar 27 '13 at 2:20
  • I've experience similar issues, just restart it – daisy Mar 27 '13 at 4:43
  • The 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". – Jenny D Mar 27 '13 at 8:13
0

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

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.