htibatong

Q: mdworker keeps running at 100%

one of my mdworker processes keeps running at 100% (which is one core of my i7 MBP Pro). Even when I completely disable indexing and search for all disks, and then even after reboot, it keeps running, consuming 100% cpu time.

How can I get control over this process again?

MacBook Pro (Retina, Mid 2012), OS X Mavericks (10.9)

Posted on Nov 18, 2013 10:38 AM

Close

Q: mdworker keeps running at 100%

  • All replies
  • Helpful answers

  • by w7ox,

    w7ox w7ox Nov 18, 2013 10:50 AM in response to htibatong
    Level 4 (2,389 points)
    Nov 18, 2013 10:50 AM in response to htibatong

    It should stop once Spotlight completes its initial indexing. This assumes you've just installed Mavericks.

     

    Phil

  • by htibatong,Solvedanswer

    htibatong htibatong Nov 18, 2013 10:51 AM in response to htibatong
    Level 1 (0 points)
    Nov 18, 2013 10:51 AM in response to htibatong

    I think I found the solution (not the reason or explanation though): I rebooted into single user mode and then, without doing anything in single user mode, simply rebooted. The 100% mdworker process is gone now and indexing is going on normally, with similar load to 4-5 mdworker processes and one mdworker32 process. Don't know what was wrong, but at least this CPU hog is gone now.

  • by htibatong,

    htibatong htibatong Nov 18, 2013 10:53 AM in response to w7ox
    Level 1 (0 points)
    Nov 18, 2013 10:53 AM in response to w7ox

    no, to find out where this is coming from, I had disabled all indexing. But even then the process continued to consume 100%. And it's not installation related, as I have been using 10.9 ever since the day it was released.

    But I found the workaround, see my other reply... (single user mode).

    Thanks, though!

  • by Cat Songs,

    Cat Songs Cat Songs Nov 18, 2013 2:44 PM in response to htibatong
    Level 1 (25 points)
    Nov 18, 2013 2:44 PM in response to htibatong

    Hi, I'm having the same problem with mdworker... it's burning up my MacBook... I try quitting in the Activity Monitor, but it just starts up again.

     

    How do I "reboot into a single user mode"?

     

    Thanks!

     

    Cat

  • by htibatong,

    htibatong htibatong Nov 18, 2013 11:41 PM in response to Cat Songs
    Level 1 (0 points)
    Nov 18, 2013 11:41 PM in response to Cat Songs

    you reboot and press cmd-S when you hear the chime, it will then boot into single user mode. You only get a text console. When it's up, type "reboot" and let it reboot normally. It seemed to do the trick for me, but let's see what happens once the re-indexing of my disk has finished...

  • by htibatong,

    htibatong htibatong Nov 18, 2013 11:58 PM in response to htibatong
    Level 1 (0 points)
    Nov 18, 2013 11:58 PM in response to htibatong

    ok, my mdworker is back again with 100% cpu usage. Sigh...

    I have used Activity Monitor now to find the open files by this process and looked at all "suspicious" files that are open. What I found is that "AppDelete" (an application I use to clean up properly when removing applications) had one leftover file from "Mark Space Notebook" (an app I had removed some time ago). I manually deleted this.

    Second, I found that my "Britannica 12.0 Ultimate Edition" which I have on my disk, has a Spotlight .mdimport file (which should tell Spotlight to index the Britannica content), but that one actually is a ppc executable, so I won't work on 10.9 and Intel CPUs, obviously. I removed that as well.

    I killed the mdworker process, and so far it hasn't come back.

    So, overall, I now believe that the single user reboot probably doesn't cure the problem, but you actually have to look for files that are open to the mdworker process and find the ones which may be "stuck" or prevent the process from finishing properly.

    I'll keep an eye on it and have Activity Monitor with the CPU gauge in my dock now, so I can see when the problem is coming back, but I hope it's solved now.

  • by arghya.calcutta,

    arghya.calcutta arghya.calcutta Nov 26, 2013 10:32 AM in response to htibatong
    Level 1 (0 points)
    Nov 26, 2013 10:32 AM in response to htibatong

    Try stopping Spotlight.

     

    I was having the same problem. Both in Snow Leopard and Mavericks. I stopped using Spotlight and the mdworker CPU problem is gone.

     

    Disable Spotlight

    Use terminal to type the fllowing command. You need admin access.

    sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

    Reenable Spotlight

    sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist

     

    Ref: http://osxdaily.com/2011/12/10/disable-or-enable-spotlight-in-mac-os-x-lion/

  • by Ramrod six,

    Ramrod six Ramrod six Feb 26, 2014 9:45 PM in response to htibatong
    Level 1 (0 points)
    Feb 26, 2014 9:45 PM in response to htibatong

    I apprecaite all your comments. How do you find those files that are "stuck" or prevent the process from finishing? Then how do I disable or delete them?

  • by Command_F,

    Command_F Command_F Mar 21, 2014 10:48 AM in response to Ramrod six
    Level 1 (9 points)
    Mar 21, 2014 10:48 AM in response to Ramrod six

    Well htibatong's reply gave me the clue: my issue was with Britannica too. I have the new 2014 version but it seems the application hasn't changed, only the content. For Britannica, you need to burrow down into 'Ultimate Reference Suite' by Control-click (right-click) and choosing 'Show package contents', then 'Contents', 'Library' and finally 'Spotlight'. The offending file is 'BritannicaBookmark.mdimporter'. That needs to be neutralised: I just changed its file extension to '.not a mdimporter' (which is unlikely to clash with anything else and might remind me what I did in future). You can then reboot, or just use Activity Monitor - click on mdworker then click the X button at top left to kill it (it will restart automatically). I assume you're using Mavericks.

     

    More generally, look inside any app that you've recently installed for a '.mdimporter' file and try the above procedure. You can get some clues from Activity Monitor: click on mdworker then click the i button at top left to get a pane with three tabs, click 'Open Files and Ports' and hopefully you'll get some clues. The '.mdimporter' files in /System/Library are part of Mac OS so should be the least likely culprits, those in your user account Library are the most suspicious.

  • by stuppa,

    stuppa stuppa Oct 27, 2014 2:22 AM in response to htibatong
    Level 1 (0 points)
    Oct 27, 2014 2:22 AM in response to htibatong

    Great !

    Thanks, you've solved a problem I've had for a long time now. Except with previous systems booting into safe mode would kill mdworker and it did not come back on rebooting normally, and with Yosemite this stopped working. What is interesting is I noticed the problem because my battery would deplete very quickly, and on Yosemite activity monitor energy tab doesn't show spotlight burning through the battery  - even though it's still happening.