nscd uses 100% cpu

6,596

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

Share:
6,596

Related videos on Youtube

ktm5124
Author by

ktm5124

I'm a software engineer and computer scientist.

Updated on September 18, 2022

Comments

  • ktm5124
    ktm5124 almost 2 years

    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?

    • jordanm
      jordanm over 11 years
      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?
    • phemmer
      phemmer over 11 years
      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.
    • daisy
      daisy over 11 years
      I've experience similar issues, just restart it
    • Jenny D
      Jenny D over 11 years
      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".