1 2 Previous Next 24 Replies Latest reply: Mar 31, 2013 11:40 AM by VilleFromFinland
Kerry Emerson Level 1 Level 1 (0 points)

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)
  • 1. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    pickerin Level 1 Level 1 (5 points)

    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.

  • 2. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    TheSink Level 1 Level 1 (5 points)

    If you look in /Library/LaunchDaemons/

     

    You should find the PenCommService launcher there which is continually trying to launch something that isn't working under Lion. LiveScribe has said they are within a short time of releasing Lion compatibility.

  • 3. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Kerry Emerson Level 1 Level 1 (0 points)

    Thanks. This certainly pointed me in the right direction. Now I just need to wait for an update from the App maker.

     

    Kind Regards,

    Kerry Emerson

  • 4. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Kerry Emerson Level 1 Level 1 (0 points)

    Great, thanks. It's always good to learn what makes this thing tick. I've removed the offending App(s) and will wait for updates via the AppStore.

     

    Thanks again.

     

    Kind Regards,

    Kerry Emerson

  • 5. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    a130s Level 1 Level 1 (0 points)

    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

  • 6. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Michael Douma Level 1 Level 1 (10 points)

    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.

  • 7. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Michael Douma Level 1 Level 1 (10 points)

    Correction: The above is true, but high CPU use returned.

    I had to totally rebuild the Spotlight database. To delete it, from terminal:

     

    %  sudo mdutil -E -a

     

    Then, needed a full rebuild. I rebooted early on, and that confused mds, so I re-deleted and then left the computer on overnight. opendirectoryd no longer running incessantly.

  • 8. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    a130s Level 1 Level 1 (0 points)

    @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!

  • 9. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Michael Douma Level 1 Level 1 (10 points)

    @a130s, just to check, you did not include the "%" in step 2, right? The % was meant to indicate the command line prompt.

  • 10. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    a130s Level 1 Level 1 (0 points)

    Right, % was only to show the command prompt.

  • 11. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    dapark Level 1 Level 1 (0 points)

    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???

  • 12. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Michael Douma Level 1 Level 1 (10 points)

    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.

  • 13. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    dapark Level 1 Level 1 (0 points)

    I'm not even using Time Machine.. I'm at a loss as to what to do. My battery only lasts an hour after being fully charged.

  • 14. Re: launchd and opendirectoryd crazy CPU usage after installing Lion
    Michael Douma Level 1 Level 1 (10 points)

    Do you have a very large mailbox managed by Outlook? And/or try setting Spotlight to NOT index (privacy) the folder containing your outlook messages.

1 2 Previous Next