mdworker – What is mdworker?

Sep 14, 2009 - 31 Comments

mdworker Ever wondered what the ‘mdworker’ process was on a Mac? 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).

We’ll cover some common questions and answers regarding mdworker on Mac, inspired by my recent switcher friend who arrived at the Mac OS platform from the other side, 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. If you have a very large hard drive with a ton of data on it, mdworker can take a long time to complete as each individual file is indexed.

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.


Related articles:

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


» Comments RSS Feed

  1. Gerard says:

    Wouldn’t the right question (request to Apple) be: How we can schedule this? .. I want spotlight working, but please index my disk when I’m not working myself :-/

  2. ideas says:

    If the Mac system was really bright it would get the thing to index in the middle of the night, or at a specified time, instead of making sure you’re trying to do some work. As for old machines, why should that make a difference? We need to have different types of computer for different work patterns. At the moment they aim to sell the same spec to gamers, graphic design, writers, scientists…. crazy. We don’t all buy the same car or truck. Or the same kind of house.

  3. DH says:

    Doing a “ps -ax” in Terminal I find 16 copies of mdworker running after the system has been up for over 30 minutes. Of the 16, 8 end in “single” and 8 in “shared”. EtraCheck reports only 7% mds cpu.

  4. Dave says:

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

  5. 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)

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

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

  8. […] 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 […]

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

  10. Phoenix says:

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

  11. […] 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 […]

  12. hagen says:

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

    Activity Monitor, select process, quit process.


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


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

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

  15. 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… :-(

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

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

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

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

    • D says:

      ………transition to Mac.

    • Some Guy says:

      What do you expect? You’re running a machine that’s generations older than what’s currently out there.

    • Chris says:

      Uh, dude, you’re running a six year old machine. Spotlight is useless? You must be *really* new to Mac. Spotlight is fantastically useful.

      What version of Mac OS X are you using. It’s changed a lot since the G4 days!

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

Leave a Reply


Shop on and help support OSXDaily!

Subscribe to OSXDaily

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

Tips & Tricks


iPhone / iPad



Shop on Amazon to help support this site