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

Reply
Question marked as Top-ranking reply

Posted on Nov 26, 2013 10:32 AM

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/

11 replies
Question marked as Top-ranking reply

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/

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.

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.

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.

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.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

mdworker keeps running at 100%

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