Want to highlight a helpful answer? Upvote!

Did someone help you, or did an answer or User Tip resolve your issue? Upvote by selecting the upvote arrow. Your feedback helps others! Learn more about when to upvote >

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

launchd and opendirectoryd crazy CPU usage after installing Lion

Since installing Lion, my 13" MacBook Pro now sits with launchd taking up 50% CPU and opendirectoryd taking up 25%.


This doesn't leave much CPU time for anything else.


Can anyone please help?


Cheers,

Kerry Emerson

MacBook Pro, Mac OS X (10.7)

Posted on Jul 22, 2011 3:56 AM

Reply
Question marked as Best reply

Posted on Jul 22, 2011 4:14 AM

You probably have incompatible software running under launchd and it is crashing constantly.


Check your Console application (found in Utilities) and see if there are logs showing up.


For me, Livescribe Desktop is broken under Lion, I see the following filling my logs:


Jul 22 07:11:50 Walkabout com.apple.launchd[1] (PenCommService[14433]): getpwnam("_pencomm") failed

Jul 22 07:12:00 Walkabout com.apple.launchd[1] (PenCommService[14434]): getpwnam("_pencomm") failed

Jul 22 07:12:10 Walkabout com.apple.launchd[1] (PenCommService[14435]): getpwnam("_pencomm") failed

Jul 22 07:12:20 Walkabout com.apple.launchd[1] (PenCommService[14436]): getpwnam("_pencomm") failed

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService[14437]): getpwnam("_pencomm") failed

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService[14437]): Exited with code: 1

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService): Throttling respawn: Will start in 10 seconds

Jul 22 07:12:40 Walkabout com.apple.launchd[1] (PenCommService[14440]): getpwnam("_pencomm") failed


Over and over. This can spike CPU usage for the launchd. Probably something similar for opendirectoryd as well (there are known issues with network mounts in Lion (they changed netatalk to version 2.2, and most NAS servers are not compatible). You should be able to get more information in the logs, post them here for additional assistance.

24 replies
Question marked as Best reply

Jul 22, 2011 4:14 AM in response to Kerry Emerson

You probably have incompatible software running under launchd and it is crashing constantly.


Check your Console application (found in Utilities) and see if there are logs showing up.


For me, Livescribe Desktop is broken under Lion, I see the following filling my logs:


Jul 22 07:11:50 Walkabout com.apple.launchd[1] (PenCommService[14433]): getpwnam("_pencomm") failed

Jul 22 07:12:00 Walkabout com.apple.launchd[1] (PenCommService[14434]): getpwnam("_pencomm") failed

Jul 22 07:12:10 Walkabout com.apple.launchd[1] (PenCommService[14435]): getpwnam("_pencomm") failed

Jul 22 07:12:20 Walkabout com.apple.launchd[1] (PenCommService[14436]): getpwnam("_pencomm") failed

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService[14437]): getpwnam("_pencomm") failed

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService[14437]): Exited with code: 1

Jul 22 07:12:30 Walkabout com.apple.launchd[1] (PenCommService): Throttling respawn: Will start in 10 seconds

Jul 22 07:12:40 Walkabout com.apple.launchd[1] (PenCommService[14440]): getpwnam("_pencomm") failed


Over and over. This can spike CPU usage for the launchd. Probably something similar for opendirectoryd as well (there are known issues with network mounts in Lion (they changed netatalk to version 2.2, and most NAS servers are not compatible). You should be able to get more information in the logs, post them here for additional assistance.

Jul 31, 2011 11:15 AM in response to Kerry Emerson

I've seen opendirectoryd (and automountd) uses up around 100% for total of my CPU too. Fan keeps growling all the time probably due to those processes. They restart immediately after I "force quit" them.

On console message, I don't really see launchd related errors.


I just found that stopping dropbox (which was just waiting for the new changes. Data is already synchronized so it doesn't need to work so eagerly I guess) calms down those 2 processes.


So as a temporary workaround in my situation, I run dropbox only when I need.


So far I haven't found others claiming on dropbox' support community with exactly the same issue, this might not be that common issue?


MacBook 5.1, dropbox 1.1.35

Oct 3, 2011 7:06 AM in response to Kerry Emerson

I fixed this another way. I had opendirectoryd using 25-50% of CPU on a quard core Mac Pro running 10.7.1. No obvious messages in console.


The problem was that spotlight was confused. I added my main hard drive to Spotlight's 'Privacy' panel in System Preferences, and then removed it. This triggered my main hard drive to be reindexed by mds. After several hours of high CPU and disk use by mds, both opendirectoryd and mds are at low CPU usages.

Oct 5, 2011 1:41 AM in response to Michael Douma

@Michael Douma,

I've tried what you suggested. Though I can't say it has fully resolved the issue since the 2 processes still bump at occasionally, someting has certainly changed. I'll keep observing. What I did was as you're suggesting: 1) add & remove the main drive at Spotlight's 'Privacy' panel, 2) Rebuild Spotlight's DB by running "% sudo mdutil -E -a", 3) keep Mac on for a day.

Thanks a lot!

Nov 17, 2011 9:54 AM in response to Kerry Emerson

I'm having the same problem. opendirectoryd is taking up 100% of my CPU and I think as a result it is draining the battery ridiculously fast. I have Dropbox but I turned it off and it does not solve the problem. When I check Console the only recurring log is one related to Outlook:


Microsoft Outlook: CFURLCreateWithString was passed this invalid URL string: '/EWS/Exchange.asmx' (a file system path instead of an URL string). The URL created will not work with most file URL functions.


I'm not sure if this is related or if it's a completely separate issue. Does anyone have any advice???

Nov 17, 2011 9:58 AM in response to dapark

Previously, I had opendirectoryd taking up a lot of CPU. Another symptom was long/slow Spotlight backups. This slightly improved when I blocked some folders from being backed up, but still persisted. I also had previously moved my iTunes library to another drive.


Ultimately, I moved approx 1.5 million small files from my main drive to another drive that is not backed up by Time Machine.


That cut both opendirectoryd and spotlight backups back to a reasonable duration.

Nov 17, 2011 10:24 AM in response to Kerry Emerson

My problem was in fact Livescribe crashing, once I disabled it (and then Livescribe finally released a Lion compatible version) my problem went away.


I also allowed my machine to complete its Spotlight index. If Spotlight is actively indexing (pulsing black dot inside the little magnifying glass), this is most likely your issue, you're just going to have to let it finish, or severely restrict what it's indexing.

launchd and opendirectoryd crazy CPU usage after installing Lion

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