Apple Event: May 7th at 7 am PT

Looks like no one’s replied in a while. To start the conversation again, simply ask a new question.

Directory Services eating CPU cycles

I've got the same problem I've read about in other forums... Directory Services is hogging my cpu. Not doing anything, it's usually between 40% and 90% cpu... This has only begun happening since a format/reinstall of the OS (and everything else) about two weeks ago. I found some articles saying it was because of a long hosts file, and I have a huge ad-blocking hosts file, but I had that before and never had this problem until reinstalling... I'm also sharing the ethernet network via wifi, but again I was doing that before I reinstalled and never had any problems. Any clues?

Macbook Pro, Mac OS X (10.6.6), big hosts file, no other significant tweaks to network settings

Posted on Jan 28, 2011 7:47 PM

Reply
24 replies

Feb 7, 2011 6:16 PM in response to akickintheteeth

LOL no repair permissions can't do anything in this case. The problem is caused by DirectoryService grepping the /etc/hosts file for EVERY domain lookup. Apple moved DNS lookups to the DirectoryService daemon in Snow Leopard. The situation occurs with a large hosts file. So tell the dev to use this hosts file on his test system, and use a web browser that saves sessions like OmniWeb with a dozen or so tabs. Try refreshing all the tabs and watch the CPU utilized by DirectoryService consume over 400%. Or refresh a load of RSS feeds.

http://www.mvps.org/winhelp2002/hosts.txt

Feb 11, 2012 1:26 AM in response to akickintheteeth

Fixed!

I had the DirectoryService taking 100% of CPU since today. Thought of the last stuff I installed/updated. The latest was Samsung Kies (yes, still desperatedly hoping to marry my Galaxy with my MBP...). In monitor activities I found a KiesViaWifi process (or something similar). Killed it and it worked: DirectoryServices went from 100% to 0%.


Don't know what's going to happen after rebooting. I have a MBP 15'' , i7, 8Gb RAM, SL 10.6.8


Good luck

May 15, 2012 8:10 AM in response to akickintheteeth

Hi -


In my case, I have a very short hosts file and no Samsung stuff installed, but was still having DirectoryServices peg the needle at 100% CPU. I noticed that a process called dscl running and using 10% CPU.


Some man-page reading revealed that it is a command line utility for managing users and groups. It seems to me that a command line utility like that shouldn't run for hours, so I sudo kill -9'd it. Immediately after that DirectoryServices usage dropped back to 0.


I'm not sure why root wanted to run dscl, but whatever the reason dscl seemed to be asking DirectoryServices to do lots of stuff.

Directory Services eating CPU cycles

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple ID.