You can make a difference in the Apple Support Community!

When you sign up with your Apple Account, you can provide valuable feedback to other community members by upvoting helpful replies and User Tips.

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

MDS and mdworker processes gone wild

Ever since I upgraded to Lion on my Macbook Pro I am getting intermittant periods where the MDS and MDWORKER processes completely take over the CPU and all apparent activity for minutes at a time. It's now been a week, so I'm quite sure Spotlight is done indexing the drive. What are my options?


User uploaded file

MacBook Pro 15" (early 2009)-OTHER, Mac OS X (10.7), 2.8GHz Core 2, 8GB RAM, 500GB HD

Posted on Jul 27, 2011 5:02 PM

Reply
Question marked as Top-ranking reply

Posted on Jul 30, 2011 12:39 PM

now i found this, and it works fine for me:


"I decided to exclude /Volumes/TimeCapsule from Spotlight (System Preferences -> Spotlight -> Privacy). And within a matter of seconds mds dropped from close to 100% CPU usage to about 10%. Now, 20 minutes later, it’s steady at 0,00% which is the way it should be."

43 replies

Mar 18, 2012 6:28 PM in response to Linda Custer

Thank you, thank you Linda,

The Backblaze solution worked!!!! I have two identical 2011 MacBook Pro's and a 2011 iMac.

The one MacBook Pro, not using backblaze has been running cool. For months the MacBook Pro backing up to backblaze could burn your hand with the air blowing out the back. With the fan blowing 90% of the time, my battery life was down to about 2 hrs. iMac running cooler also.

Mar 29, 2012 9:12 AM in response to adamhauck

I Still think apple needs to revise the Spotlight feature and exclude folders such as junk mail etc.

I had to completely turn MDS off since I have no time to debug their mistakes.


I ran this:

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

to disable spotlight.


you can then re-enable it using:

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

after they hopefully fix the performance issues.

Apr 22, 2013 4:19 AM in response to adamhauck

2 solutions


  • SPOTLIGHT shut down for re-indexing by the command "sudo mdutil-a-i on" does not change the problem.
  • Change Priority SPOTLIGHT : Set Spotlight indexer (mds, mdworker) to a lower processor priority:
    • sudo defaults write /System/Library/LaunchDaemons/com.apple.metadata.mds LowPriorityIO -bool true
    • sudo defaults write /System/Library/LaunchDaemons/com.apple.metadata.mds Nice -int 20


Apple needs to give lots of attention to Spotlight in its ML maintenance updates.

This is not an OPTION but a priority in the future update 10.8.x


It makes you almost want to change OS and switch to the competitor

Steve ? What you doing now ??

Dec 9, 2013 12:25 PM in response to adamhauck

Resetting SMC seems to have worked for me (on chat with Apple rep). This is what she had me do (for my iMac):


For resetting the SMC, what we want to do is have the iMac powered off first.

Then we want to:

1. Unplug the Power Adapter from the back of the Mac

2. Keep the power cord unplugged for 10-15 seconds, then attach it back into the Mac

3. Press the power button to turn on the computer.

http://support.apple.com/kb/HT3964


mds and mdworker seem to be behaving fine now.


HTH


Ajay

http://www.tapinferno.com

Feb 18, 2014 12:17 AM in response to adamhauck

You can see what Spotlight's doing by taking a peek at what files its indexing process, mdworker, is reading with this terminal command from an admin user accout:

sudo fs_usage -w -f filesys mdworker


If the output is going too fast, you can pipe it to less and page through it with spacebar (press "u" to go up a page):

sudo fs_usage -w -f filesys mdworker | less


Or output it to a file for later reference:

sudo fs_usage -w -f filesys mdworker > ~/Documents/mdworker.txt

Just hit ctrl-c after it's been running for several seconds to get a good sample dumped to the file.


In all likelyhood you'll see a pattern of the same files being indexed over and over. A common one is the Google Chrome "Extensions" folder. Once you've found the culprit(s), you can do more investigation or just exclude them or a folder 1 level up from indexing in the Privacy tab of the Spotlight PrefPane. To make things easier, you can press cmd-shift-g after clicking the + there, and then paste a path from your terminal output. The changes should take effect immediately, however if you need to reload spotlight:

sudo launchctl stop com.apple.metadata.mds && sudo launchctl start com.apple.metadata.mds

MDS and mdworker processes gone wild

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