Zum Inhalt

mds / mdworker running wild on OS X (10.6 AND 10.7) – again

Just about a month ago I wrote about a problem I had with the mds process on OS X. That’s the process that indexes your HDD for spotlight.

Mine was running wild then and I found a way to fix it. Now, after the last system update, this was happening again. I tried to apply the same fix – only to see, that the update didn’t change anything about my settings there.

I disabled all aspects of spotlight, one item at a time (disallowing it to search Applications, Contacts, … until I was down to „Messages“). Didn’t help. Rebooting did – for a few minutes. Oddly enough, this didn’t happen on my second machine which runs (almost) the exact same software.

So I figured that something on my HDD (which is actually an SSD) must undergo constant changes so that spotlight would have to index it over and over again. While thinking about that, mds stopped and went down to a CPU usage of 0,0%.

I waited about an hour and it was up to 104,7% again (plus 63% for mdworker). By then I already had found the solution and had only waited for mds running wild again so I could verify my theory…

I’m a long time customer at Backblaze – an online backup service provider. The backblaze application constantly watches over changes on my system and, if it found any, encypts the newly added/created files and uploads them to a backblaze server. The tempory data needed to do this is being stored in USER/Library/backblaze. After adding this folder in the „Privacy“ tab of spotlight’s settings in System Preferences, mds IMMEDIATELY went to to 3,4%, then 2,0% and finally to 0,3% CPU usage.

I don’t know why this started happening just now. I don’t know wether this is happening only on one of machines. But I’m 99,9% sure that this did the trick.

So if you’re using backblaze on a Mac with spotlight and experience mds/mdworker running wild from time to time or even regularly – you might want to give my solution a shot.

Published inAllgemein

36 Comments

  1. Playersons Playersons

    I have a 10.7 (build 11A511) and found the directory to be excluded from Spotlight to be /Library/backblaze.
    Nonetheless, your solution worked fine, thanks for that.

  2. Playersons Playersons

    I have a 10.7 (build 11A511) and found the directory to be excluded from Spotlight to be /Library/backblaze.
    Nonetheless, your solution worked fine, thanks for that.

  3. Zwamkat Zwamkat

    I concur. (Mac OS X Lion 10.7 (11A511)) The directory should be /Library/Backblaze  (Mind the capitals, paths are case sensitive!)

    • Thanks guys. I corrected it in the text. You were -of course- right.

  4. Zwamkat Zwamkat

    I concur. (Mac OS X Lion 10.7 (11A511)) The directory should be /Library/Backblaze  (Mind the capitals, paths are case sensitive!)

    • Thanks guys. I corrected it in the text. You were -of course- right.

  5. Michael Michael

    Thank  you so much.

  6. Michael Michael

    Thank  you so much.

  7. THANK YOU!  Your suggestion solved the problem with Mac OS X Lion I’ve been having for weeks!

  8. THANK YOU!  Your suggestion solved the problem with Mac OS X Lion I’ve been having for weeks!

  9. THANK YOU!  Your suggestion solved the problem with Mac OS X Lion I’ve been having for weeks!

  10. Timm Timm

    THANK YOU! I was looking for a workaround for weeks and within seconds this did the trick for me! CPU back, battery life back, cheers!!

  11. Timm Timm

    THANK YOU! I was looking for a workaround for weeks and within seconds this did the trick for me! CPU back, battery life back, cheers!!

  12. Thank you so much for this article, it helped taming mds / mdworker 😀

  13. Thank you so much for this article, it helped taming mds / mdworker 😀

  14. This worked great for me, too – thanks!

  15. This worked great for me, too – thanks!

  16. Stefan Høegh-Neumann Stefan Høegh-Neumann

    I’m not able to find the Backblaze folder, and my CPU is still running crazy.. Any help ?

    • You don’t find the Backblaze-Folder? But you are a Backblaze customer, right?

  17. Stefan Høegh-Neumann Stefan Høegh-Neumann

    I’m not able to find the Backblaze folder, and my CPU is still running crazy.. Any help ?

    • You don’t find the Backblaze-Folder? But you are a Backblaze customer, right?

  18. Thanks.  You’d think that BB would include this in their KB.

  19. JeffA JeffA

    More generically if you suspect file changes are causing mdsworker to use a lot of cpu run the following command line commands to see what:

    sudo dtrace -n ’syscall::open*:entry { printf(„%s %s“,execname,copyinstr(arg0)); } | grep mdsworkerThis should show the files being opened in real-time.  Once you get a handle on the files/directories it’s pretty simple to exclude.Apple should provide an easy way to do this from within preferences since so many people have this problem.

  20. JeffA JeffA

    Slight typo:

    sudo dtrace -n ’syscall::open*:entry { printf(„%s %s“,execname,copyinstr(arg0)); }‘ | grep mdworker

  21. Jason Jason

    Thank you, thank you, thank you!!! I could not pin this down. I turned off Spotlight indexing for a while but, that caused all kinds of issues of course… My machine is now running normally again thank God.

  22. This helped me solve the problem by adding the ~/.dropbox temporary folder for the Dropbox file sync service to the Spotlight Privacy list. Thanks!

    • Gilles Barbier Gilles Barbier

      how do you do that – this folder doas not appear in my spotlight privacy preferences, aven with hidden files displayed ?

      • cmd+shift+g, then enter ~/.dropbox/

  23. I never use backblaze, but backblaze make my processor crazy! So, it’s not a backblaze cause?

  24. armand armand

    i am in mountain lion, and i use new version of backblaze! i did not find /Liberary/Backblaze but i adde /Liberary/Backblaze.bzpkg but cpu still is running wild! please help me!

  25. geekG geekG

    Thank you for sharing!

    The magic mouse was lagging and i suspected some network intrusion.. but after investigating, ‚mdworker‘ was showing super high on cpu usage.

    I use NAS for timemachine backup, and i suppose when you enter in time machine, it open a folder which is shown in finder [which can be ejected]. So after ejecting that remote-folder from the finder. The ‚mdworker‘ went from high to low.

Kommentar verfassen

%d Bloggern gefällt das: