Why is the mac mdworker hogging my CPU?

What is a mdworker you ask? Heck if I know but it sure likes to suck up CPU. It is used by Spotlight to index things so you can find them faster. In case you get the idea that you don’t need spotlight and you want to turn it off, you can, but it is not recommended. Why not just use the Alfred app and turn spotlight off. Don’t do it.

Here are some tips to reduce the CPU spikes.

Ivan Clark posted this info about mdworkers in the comments of this link:

Here is some onfo for those that need it

mdworker is short for ‘metadata server worker’ and if you’re still confused don’t feel bad. mdworker is basically the core technology behind Mac OS X’s awesome search engine Spotlight, it spiders meta data from your Mac and its files and creates a readable index so that you can find things practically instantaneously via Spotlight (command-spacebar). Here are some common questions and answers regarding mdworker, inspired by my recent switcher friend Daryl, who tweeted me asking why mdworker is taking up so much CPU.
What is mdworker?

As mentioned above, mdworker is part of Spotlight, which is basically a search engine for your Mac (think Google but locally, for your own files).
mdworker is slowing down my Mac with 60% CPU usage!

Yes, mdworker will sometimes cause your Mac to be slow and have high CPU usage, this is totally normal. You should just let it run until it’s finished, and CPU usage will be back to normal.
How long does mdworker take to finish?

This is entirely dependent on the last time that your Mac filesystem was indexed and the amount of new files since indexing. If you just plugged in a loaded external hard drive, expect it to take a while. 15 minutes to well over an hour are not uncommon amounts of time for mdworker to run.
Should I kill mdworker? What happens if I kill mdworker?

No you shouldn’t kill mdworker, because it’s doing you a service by indexing your Macs contents. If you do kill mdworker, your Mac filesystem will not be completely indexed and it’s searchability will be greatly reduced until mdworker runs again and completes a full indexing. There is no serious problem with killing mdworker, it’s just not recommended.
How can I stop mdworker or disable mdworker?

Since mdworker is part of Spotlight, you’ll have to disable Spotlight to disable mdworker. Again, this is not recommended, but if you want to disable mdworker here’s a how-to guide:
How to Disable Spotlight
What about mds? Is this tied to mdworker?

Yes, mds is the parent metadata server that runs the child process mdworker, the two usually run concurrently. You can read specifically about mds and Mac OS for more information.

Leave a Reply

Your email address will not be published. Required fields are marked *