mds running wild on OS X 10.7 (Lion)

Juni 4th, 2011 | by | apple

Jun
04

flattr this!

UPDATE: Since the release of OS X Lion, my blog is being frequented three times as often as normally. Especially this article seems to attract a lot of attention.
If you just updated to OS X Lion and your mds or mdworker (both parts of Spotlight) are running wild: don’t worry. It’s most likely that everything is OK. Spotlight needs to (re-)index a lot of stuff. Just let it work for a couple of minutes (maybe even hours). If mds/mdworker don’t calm down, come back here and read the following or this article. :)

Cheers.

END OF UPDATE

Just jotting down a few notes on what I found a couple of minutes ago…

I updated my iStatsMenus installation on my OS X 10.7 MacBook Pro to restore compatability with Apple’s new system and thus, for the first time in weeks, had all running processes viewable right underneath my nose.
I then saw that mds, the process that indexes the Volumes for spotlight, was running all wild and crazy at about 85-97% CPU usage for more than two hours.

Google didn’t help much and so I had a look at the logs (go to Applications, Utilities, then Console and filter for “mds”) and almost immediately found out what this was about:

mds was having some trouble with a “virtual” Volume, called “MobileBackups” . I didn’t research much further, but I guess this has to do with Lion’s ability to do local Time Machine backups…
Well, whenever I put a file into the trash, I could find errors like this in the log:

mds: (Error) Backup: Couldn’t stat source path ‘/Volumes/MobileBackups/Backups.backupd/Sebastian’s MacBookBook Pro/2011-06-04-084934/Macintosh HD/iSchack/.Trash/testtext.rtf’ — importing from backup path instead.

I decided to exclude /Volumes/MobileBackups 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.

Maybe this can help others, too…

Authored by

  • Pingback: mds / mdworker running wild on OS X (10.6 AND 10.7) – again | SchackNetz

  • http://twitter.com/Rootgar Ingo

    Disable the View for the Virtual Drive in iStat and the problem its gone. :-)
    Thx for the hint that iStat could make the Problem. :-)

  • http://twitter.com/Rootgar Ingo

    Disable the View for the Virtual Drive in iStat and the problem its gone. :-)
    Thx for the hint that iStat could make the Problem. :-)

  • http://twitter.com/Oortooless Boris Y.

    Thank you

  • http://twitter.com/Oortooless Boris Y.

    Thank you

  • Michael Baumann

    Actually – could be even more simple – based on the “when I added to the trash” – I emptied my “trash” and mds settled right down.  However, disabling from iStat makes sense as well.

  • Michael Baumann

    Actually – could be even more simple – based on the “when I added to the trash” – I emptied my “trash” and mds settled right down.  However, disabling from iStat makes sense as well.

  • Yebo29

    Yep. Worked for me. Spotlight was indexing a mounted WEBDAV volume and was spiking CPU’s. Simply excluding that calmed spotlight down. Thanks for the tip!