mds – what MDS process is and why it uses CPU on the Mac

Aug 5, 2010 - 21 Comments

mds mac
If your Mac is suddenly running sluggish and you launched Activity Monitor, you may notice a process named ‘mds’ cranking away at 30% and even up to 90% CPU utilization. If you see this, don’t worry, it’s not abnormal behavior and your Mac isn’t crashing, it’s just indexing it’s built in search engine.

What is MDS in Mac OS?

mds stands for “metadata server” and the mds process is part of Spotlight, the amazingly powerful and very useful search feature built directly into the foundation of Mac OS X. You access Spotlight by hitting Command+Spacebar.

An easy way to identify that mds and Spotlight is indexing is to look at the Spotlight icon in the upper right corner of your menubar, when Spotlight is indexing the magnifying glass will have a dot in the center like so:

mds update

You can then click on the Spotlight icon and you’ll see your main hard drive being indexed, with a progress bar and estimated time until completion:

mds updating

Is the mds process related to mdworker?

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

How long does mds & Spotlight take to finish indexing?

How long it takes to update the Spotlight index depends on a few variables, but mostly the size of your hard drive, the amount of data being indexed, major changes to the filesystem, and the time since last indexing. Just let the indexing complete, it generally takes between 15 and 45 minutes to complete.

If Spotlight isn’t working, you can check out these Spotlight troubleshooting tips which will get you situated again. If you don’t ever use the search feature or just don’t like it, you can also disable Spotlight and all of its indexing.

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:

  • No related posts
Posted by: Paul Horowitz in Mac OS X, Troubleshooting

21 Comments

» Comments RSS Feed

  1. BugsMan says:

    And which particular Apple employee (Marketing Dept) wrote this?

    Quote:

    “What is MDS in Mac OS?

    “mds stands for “metadata server” and the mds process is part of Spotlight, the amazingly powerful and very useful search feature built directly into the foundation of Mac OS X. You access Spotlight by hitting Command+Spacebar.”

    I subscribe to this RSS feed because I have used Macs from the day they were launched; not to be bombasted with “the amazingly powerful …” hyperboles.

    • Paul says:

      @BugsMan

      I wish I was an Apple employee!

      Seriously though, I’ve had enough people ask me about “my Mac is running slow randomly” and “what the heck is mds and mdserver?” that I felt it justified writing an explanation. We have a pretty diverse readership here from complete novice to expert and we try to accommodate that. You’re more than welcome to email us some topics, suggestions, or even your own tips to osxdailycom@gmail.com

      I find Spotlight pretty handy and I use it constantly, so I tend to talk it up a bit, it’s not meant to convey any other message or agenda.

      – Paul

  2. Peter says:

    Contrary to BugsMan, I liked the short article. Thanks OS X Daily for posting these short tips and hints! I didn’t know (or had forgotten) what the dot in the center of the magnifying glass means. Now I know.

    BugsMan, maybe you find some tips below your level — you have after all “used Macs from the day they were launched” as you write — then just ignore those helpful hints and be happy that we are others that benefit from them, and be happy you already are in the know.

  3. […] runs the child process mdworker, the two usually run concurrently. You can read specifically about mds and Mac OS for more […]

  4. […] do MDS and MDWorker have to do with Spotlight? The MDS process and mdworker processes usually run concurrently on your Mac when Spotlight is indexing your Mac. […]

  5. Jeff says:

    The most important question, however, is “how do you shut down that stupid mds process that is taking up 2GB of memory?” Pertinent if you’re doing computing with your mac, and that silly program is at the top of your “top -o rsize” I just saw it there, found this helpful post, and decided to experiment. I did this command: “sudo killall mds” and it went away. Nothing else seems to have crashed, so I hesitantly recommend this as a possible one-time solution, with caution of course. :)

    Wait, never mind. It started up again. Anyone know how to disable it?

  6. @Jeff

    sudo ln -s /dev/null /System/Library/Frameworks/CoreServices.framework/Frameworks/Metadata.framework/Support/mds

    =)

    (For the sake of future Internet searchers finding this page: Just Kidding! Also -f flag left off intentionally. Whew!)

    -Rob

  7. Mike says:

    My mds process is not hogging to the extent that you are describing but it is using a constant 254MB of virtual memory which is the top user on a periminant basis. Does that sound right? Is is a problem?

    Great article I have never noticed spotlight icon with a dot in the middle meaning that indexing is going on. Can you schedule it to happen when you decide not when the mac decides? “

  8. Kono says:

    my mds and mdworker is completely hogging my system and it has been going on for several week. I am suspecting that this is not a correct behavior. Does anyone know how to fix this permanently?

    Thanks,

  9. Morialkar says:

    @Kono: do you restart your mac on a regular basic? this will probably clear the problem, as (I’m making a guess here) the process probably uses more RAM over time, in the same manner as Chrome or Firefox after 3 days and 10 tabs openned.

  10. […] in Mac OS X Lion can be done with the help of the Terminal. The following command unloads the Spotlight mds agent from launchd, preventing the daemon from running or indexing any drives […]

  11. Albert G says:

    I just started an initial time machine backup (on a new drive) and I noticed the mds and mdworker processes hitting the CPU in a big way.

    Does this mean that spotlight is now also indexing the backed-up files ?

    Albert

  12. Luke says:

    Thank you for writing this really nice, simple explanation of mds. It’s been running at 75% on my mac and I didn’t know if it was some process that was hanging that I should kill. I wish you could schedule it without needing to know Terminal language.

    And I agree that Spotlight is wonderful and more people should know about it, and so a little praise about it is a good thing. Too bad Bugsman didn’t agree. I’m glad we know his opinion and can change the world to fit his preferences.

    I drifted to Alfred from Spotlight, though, because it displays results with big text, in the middle of the screen. I like that!

    Luke

  13. j says:

    BugsMan is a douchebag. Keep up the good work.

  14. Bill says:

    This is only 1 example of what MDS does. On my machine its running at 63% with a secondary mdworker running at 115% and my spotlight is not indicating anything of a rebuild.

    This is a major pain in the butt. This happens randomly almost everyday. Spotlight is a bloated piece of junk software that appears to be thrown together by a group of people being rushed. Is not clean, its not smooth, Its not even smart enough to ignore the contents of a program and lists pieces of graphic art for the UI’s and app note files that any normal day to day user would NEVER search for.

    Apple is falling apart, loosing its shine, as sloppy programmers, Ideas and programming are poorly implemented and handed out to Users.

  15. Andrew D. says:

    It’s a bit much to segue from a computer annoyance to a sweeping prediction of where Apple is going.

    If mds is going nuts evebn after reboot I would figure it is corruption somewhere. Perhaps reset the index to start from zero: http://support.apple.com/kb/HT2409?viewlocale=en_US&locale=en_US I am very sensitive to processes wasting power on my macbook (no laptoasters, thank you) and rarely have had a problem with mds or spotlight. The UI could use work though, like a lot of Apple stuff right now.

  16. George says:

    If you are using a using any P2P programs you may want to prevent Spotlight from searching your”incoming” directory. I discovered Spotlight was trying to index the partial files and was killing my performance. Once I added the directory to the list under System Preferences > Spotlight > Privacy my utilization went back down to normal.

  17. […] can also look in Activity Monitor for the “mds” or “mdworker” processes, both of which are related to […]

  18. […] reemphasize, this does not disable Spotlight or mds, it only hides the icon from the […]

  19. […] an upgrade from 10.6, 10.7, or 10.8, this is usually because of Spotlight and the mdworker & mds process combination, which irons itself out over the course of an hour or so. If waiting it out […]

  20. […] or by hitting the “-” minus button in the lower left. Removing items will trigger the mds and mdworker processes to run again, and when finished the once excluded files will be searchable […]

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