dslreports logo
site
 
    All Forums Hot Topics Gallery
spc

spacer




how-to block ads


Search Topic:
uniqs
226
share rss forum feed


horacebork
Premium
join:2011-03-17
09001
Reviews:
·Time Warner Cable
·voip.ms

[Leo] DirectoryServices well over 100% immediately after wakeup

Click for full size
immediately after sleep, my iMac 9,1 (2009) os x 10.6.8 goes into 200% cpu usage (dual core). the culprit is DirectoryServices: it is hogging over 150% cpu most of the time and sometimes up to 190% cpu usage. see attached screenshot.

i have done some research on this on the web. lots of people have this same problem on different os versions. found only one (maybe) solution: wipe and reinstall os x on the machine.

there has to be something less drastic. anyone have any ideas about this?
--
'a day without sunshine is like, you know, night.'

Daemon
Premium
join:2003-06-29
Berkeley, CA
Reviews:
·Comcast
·webpass.net

1 recommendation

Re: [Leo] DirectoryServices well over 100% immediately after wak

this is one of those rare times where a permission repair on the disk may solve the problem. Have you tried that?

For how long does the process eat CPU? Does it eventually calm down?
--
-Ryan
I use Linux, OS X, iOS and Windows. Let the OS wars die.



horacebork
Premium
join:2011-03-17
09001

hokay.. will try a permission repair..
takes about 2 minutes or so to calm down.
--
'a day without sunshine is like, you know, night.'



horacebork
Premium
join:2011-03-17
09001
Reviews:
·Time Warner Cable
·voip.ms

2 edits
reply to Daemon

thank you very much. rare time tho it may be, the repair permissions worked.
two sleep-wake cycles later and the cpu hogging after wakeup has either been eliminated or reduced to a 1-2 second blip.

kinda begs the question: what the blazes does the repair permissions actually do?

thank you.
--
'a day without sunshine is like, you know, night.'



dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3

Resets file permissions back to their original state according to the BOM (Bill of Materials) for each installed software package ...



HiVolt
Premium
join:2000-12-28
Toronto, ON
kudos:21

I have always been baffled by this on OS X... Fixed glitchy issues many times with repairing permissions...

My question is, what changes these permissions? Is the system that wonky that it happens by itself?
--



dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3
Reviews:
·Verizon FiOS

In the early days of OS X, I'd say yes. HFS+ isn't the best file system I've ever used (I'm being nice) and before it was fully journaled, I'd call it a train wreck.

Much better now, but I do see stupid apps doing stupid things with permissions - can't tell you how many apps I've seen that do stupid sh!t like set mode 777 (read write execute for owner, group, world) on installed Frameworks and other things.

It's gotten better with time, but I do see stupidness.

We have a phrase among sysadmins: 90% of Unix problems are permissions problems. This same crud happens with Solaris, AIX, HPUX, Tru64, Linux, et al.



horacebork
Premium
join:2011-03-17
09001

but why it causes something like my original problem is not totally clear to me.
--
'a day without sunshine is like, you know, night.'



dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3

Some file that directoryservicesd tries to write or read had the wrong permissions and sent it into a loop of trying to access that file over and over ... That's my best guess and the usual behavior I would expect.



HiVolt
Premium
join:2000-12-28
Toronto, ON
kudos:21

I wonder why it isnt communicated to the user somehow... or permission repair run automatically in the background... it doesnt take long...
--



dennismurphy
Put me on hold? I'll put YOU on hold
Premium
join:2002-11-19
Parsippany, NJ
kudos:3

Agreed and agreed.

All "repair permissions" does is basically iterate through the package receipts for installed packages and compare permissions on files vs. their original state, and if they differ, execute a chmod to the original.