mdworker – What is mdworker?

Sep 14, 2009 - 28 Comments

mdworker 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.

Enjoy this tip? Subscribe to the OSXDaily newsletter to get more of our great Apple tips, tricks, and important news delivered to your inbox! Enter your email address below:

Related articles:

Posted by: Paul Horowitz in Ask OS X Daily, Troubleshooting

28 Comments

» Comments RSS Feed

  1. Resuna says:

    My hard disk is completely indexed, I haven’t added any new files recently, and mdworker has been chewing up 25% of both cores and writing gigabytes of data to the disk for the past two hours. This is not normal and expected.

  2. Kamil says:

    and people dare to complain about windows being slow.. I call it BS!! I am new to Macs and already don’t like this mdworker sucker!! it’s useless and is chewing more than 60% of my powerbook g4 CPU power right at this moment ;/ it’s been runing for past 15 minutes and I did’n make any major changes on HDD recently. Not very pleasant transmission to Mac.

  3. Jon says:

    I only use Spotlight to quickly run applications. If I have everything turned off but applications in my Spotlight preferences does mdworker spend time indexing everything new?

    • Jim says:

      One word: QuickSilver :) I *almost* never use Spotlight – some times to find a PDF or something. I *really* should turn it off on the Safari preferences folder, so it doesn’t continually reindex my web history.

  4. Firewolf34 says:

    Spotlight will update whenever a notable amount of new information is added to your computer. Let it index, and it shouldn’t bother you for a while.

    To reply to Kamil: Depending on how new your Powerbook G4 is, spotlight may still be in the process of indexing your files.

    To reply to Jon: Spotlight WILL NOT index files or folders listed as private via Spotlight Preferences.

    With the new updates to Leopard, the performance and function of Spotlight has been greatly increased. You will see a decreased index time as well as CPU usage during indexing. Hope this helps everyone.

  5. […] Usually you will see the mds process in conjunction with mdworker, which is another part of Spotlight and it’s indexing […]

  6. daddyoh says:

    i find the Mdworker-setup to be a total disaster to my Mac. Its a Macbook Pro. The Mdworker runs 90 % of the time with 70-104% CPU-use! My battery has gone from 4+ hours of work to 1 hour. I have started to monitor the processes now and I’m killing it everytime i see it appear…but what a fail feature to have running in an OS. And btw I’m running Snow Leopard… :-(

  7. Ries says:

    I think it would just be nice to know what mdworker is chewing, then a user can decide to disable it or not.

    For example some applications behave bad on a mac, for example SKype wit time machine and others that let OSX re-index large files ever time.

  8. Drupal Steve says:

    I set my System Preferences so that Spotlight only indexes Applications and Documents — the two main resources for which I use Spotlight.

    After making this change (disabling all the other options), mdworker immediately settled down.

    -Steve

    • John SMythe says:

      Thank you so much for this tip. It solved my issue immediately. I had an external drive with ~800GB of photos (and my former Windows install). As soon as I unselected pictures, things calmed down and startup is bearable again.

  9. hagen says:

    Telling people to use Terminal to kill mdworker is a crime.

    Activity Monitor, select process, quit process.

    H

  10. […] Mac running hot? The explanation is simple: Spotlight. Yup, Spotlight and it’s worker modules mdworker and mds are at it again. When you update to Lion 11A480b, whether you are upgrading from 10.6 Snow […]

  11. Phoenix says:

    If mdworker is slowing things down, what about renicing the mdworker process?

  12. […] Display Wow. An Apple product. mdworker xxx8211; What is mdworker? I guess OSX now runs on the BlackBerry. Cool. __________________ […]

  13. […] users who have just performed an upgrade from 10.6, this is usually because of Spotlight and the mdworker & mds process combination, which irons itself out over the course of an hour or […]

  14. Sid says:

    I seriously cannot *believe* that you’re telling us that we should be cool with some process suddenly eating significant memory / CPU resources at random times.

    I can think of much better uses for my RAM than supporting a search tool I think I’ve used once in three years!

    • MC says:

      So turn it off

      • Ivan says:

        You say turn it off. Other than manipulating files, etc., in some subterranean way, how? Is there a preferences option?

        I echo a lot of the statements here. This is not a good feature as described here. I have this computer so it can work for me. The attitude that mdworker will eat a lot of the CPU when it feels like it and when it want to I should stop what I am doing and wait until mdworker decides I can have my computer again is wrong. It should limit it’s cpu to a level that I find acceptable; if spotlight does not work as well as it might, that is my choice.

  15. Tim says:

    60% cpu is nothing. mdworker runs at 95% on my machine (2008 macbook pro), overheat, and kill the charger (with some smell on the macbook too). Tried to kill it many times, and it continue to resurrect at same CPU level. Finally, I power down the macbook and it stop coming back for now. Luckily I am around to hear the loud fan, and smell the burn. Otherwise, it would have fried my Mac.

  16. concerned reader says:

    You’re right, if you find yourself wanting to get rid of the annoying spotlight bobbins, it’s not worth killing mds … because, at least in Mountain Lion, the little ****er just restarts itself.

    You need to be more ruthless. As root,

    mv /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds.not

    And then killall -9 mds

    then rm -rf /.Spotlight-V100

    Remember where you put mds if you ever recant and decide to re-enable it.

    (Don’t do the above unless you’re prepared in the event that disaster ensues to lose all your data and do a complete re-install without once blaming this comment for it, obviously)

  17. Dave says:

    Nice, apple Nice the mds mdworker processes is what needs to happen……..

Leave a Reply

 

Shop for Apple & Mac Deals on Amazon.com

Subscribe to OSXDaily

Subscribe to RSS Subscribe to Twitter Feed Follow on Facebook Subscribe to eMail Updates