'mds' process out of control

Discussion in 'macOS' started by foosh, Oct 28, 2007.

  1. foosh macrumors newbie

    Oct 31, 2005
    I'm having problems with the 'mds' process running out of control.

    When it does this, 'mds' starts taking up 800-900 MB of RAM (RSIZE in Activity Mon), and then spilling over into Virtual Memory by about 2-4 gigabytes until I can get it stopped and reboot the machine. The interface also becomes extremely slow (10-15 sec. response times for mouse clicks) and the hard disk just keeps grinding away, rapidly filling up free space on the disk.

    This seems to be triggered by running non-leopard apps, like Adium for example. I will open the application, and soon thereafter will hear the hard disk start grinding and the interface becomes unusably slow as described above.

    If I check Activity Mon while this is happening, I see the 'mds' process is responsible, taking up 20-50% CPU, 800-900 MB RAM, and the virtual mem consumption by mds going up up up. My free disk space also is being filled up by whatever mds is writing to disk.

    Has anyone else noticed this problem? Any comments or suggestions greatly appreciated.
  2. Sun Baked macrumors G5

    Sun Baked

    May 19, 2002
    Might want to open the spotlight preferences, and drag your entire drive to the privacy area.

    Of course it could be adium triggering spotlight, so disabling the spotlight+adium connection might do it.
  3. foosh thread starter macrumors newbie

    Oct 31, 2005
    Well, thanks, but I'd really rather solve the problem than just shut down Spotlight altogether.
  4. kbleicher macrumors newbie

    Jun 4, 2007
    Yes, I am. I had to put everything in privacy mode just to regain control of the system. Since I'd like to actually search the disk now and then, I turned it back on by moving my primary disk off the private list, and blammo. It's going to take 65 hours to index. I turned off all sleep / screen saver options so it'd get done at night, and no help.

    Any ideas out there?
  5. foosh thread starter macrumors newbie

    Oct 31, 2005
    Spotlight hangs on search for "a*"

    If I type anything starting with an "a" into the spotlight search field, the progress indicator (spinning lines) never stops moving, and mds spirals up out of control as I describe above.

    For all other letters and for words starting with any other letter, this does not happen.

    I'm utterly baffled. Any ideas?
  6. kbleicher macrumors newbie

    Jun 4, 2007

    YES! I was able to fix the problem, but it may be somewhat specific to me.... I had a file that spotlight was stuck on.. Spinning its wheels and eating CPU...

    I refered to the post I found in the following Apple thread:


    And I took these steps as a forum member suggested:

    How did I trace the problem:
    Open 'Activity monitor'
    Watch for 'mdworker'
    Select it and click the big info button
    Now you get a popup with details
    Select the tab at the right 'open files and ports' (or something like that, i'm using a non-english version)
    Now you get the list of files 'mdworker' has used or accessed recently, scroll to the bottom of that list and you will see what file is causing the endless indexing.

    The solution in my case:

    I had an HP scanner file that was growing non-stop. Every second it scanned the front panel buttons and sent the result to a log file. Spotlight was stuck on this file since it never quit growing.

    Once i determined the file (per the steps listed above) I googled the file and found the following link:


    I applied the workaround and Spotlight finally started chugging along! It's done. It works. *sigh of relief*
  7. Ondrej macrumors newbie

    Nov 4, 2007
    Repeating indexing

    I tried the thing described by kbleicher and found that one of my old tiff pictures was re-appearing at the end of the list. I went to delete it, also from trash - the notice said "it is in use", so I emptied the trash securely and the file disappeared.
    Hard to say if the mdworker improved or not...

    What is happening to me: my spotlight indexes my drives every now and then, no logic. Half the times I want to search for something, I see "wait until indexing is done" - estimating time, usual (if any) time given is between 4 minutes and 40 hours... Twice a day...
    During such (re)indexing, the mdworker goes mad and takes 80-90% of CPU, fans go wild.

    I have very few files on my MacBook - just business stuff, no videos, couple hundred pictures - no reason to sweat much.

    Just now: the indexing was ok, now I hear fans going up, check spotlight: "Spotlight helps you find quickly..." well, after another 24 minutes. Indexing again.

    process diskimage_helper runs top CPU position at 50% (it's under launchd(1), which is under kernel_task

    What the hell is going wrong here?
    (Also I experience slow down of Safari - might there be any relation?)
  8. markjewiss macrumors member

    Feb 8, 2007
    Dunmow, UK
    I've been having a very similar problem for some time now, and finally worked it out.

    The MDS process has been taking up high CPU whilst I've been transferring large groups of files from my office to my laptop over a VPN connection. I've added the Downloads folder to the Spotlight Privacy list, and now all is good. I loose searching on that folder, but I just really use it as a temporary placeholder, so all is good.

    HTH someone at some point.

  9. dukebound85 macrumors P6


    Jul 17, 2005
    5045 feet above sea level
  10. Arrandale macrumors regular

    Feb 24, 2010

    mds is spotlight... make sure you don't have any searches active, and that there is no text in the spotlight search field, because it keeps searching in the background
  11. gravityresearch macrumors newbie

    May 1, 2010
    I've tried everything

    I've read all the threads to this post and still have not come up with a solution. What is my next step? I am constantly running out of memory because of 'mds'.
  12. imagic macrumors newbie

    May 30, 2010
    mds seems out of control - causing disk full

    me too.

    MacBook Pro (my 20th Mac), 10 Gig of disk free, mds seems to swing from 200-300mB of Virtual memory usage up to 6 Gig frequently and suddenly. Oddly - available disk space sometimes collapses from 10 Gig to 600 Mb (and so throwing "disk full errors" - but the available space does not seem to track the mds Virtual Disk usage directly.

    How can Virtual jump by 4 Gig in 3 seconds !?

    I have run Disk Utility - verified disk - no reported problems.
  13. FloatingBones macrumors 65816


    Jul 19, 2006
    See what's happening on your system with the console.app

    I had mds running about 30% of the time on an otherwise-idle machine. I just fired up the Console (console.app) to see what it was logging.

    I noticed that an omnigroup daemon process was getting repeatedly restarted by the launchd. I googled on the omnigroup file name and found how to disable that (deleting the lib/LaunchAgents plist file).

    After getting rid of the chaff in my launchd list, my system is much quieter and cooler. mds is using far less than 1% of my cycles.

    @gravityresearch: check that out. If that doesn't help and you're in proximity to an Apple store, you can book a genius bar appointment and ask there.
  14. martinplt macrumors newbie

    Jul 19, 2010
    MDS out of control - simple solution

    I experienced a similar problem - MDS consuming large amounts of system resources (CPU especially). It certainly is related to Spotlight, no question there. I came to the conclusion that I would have to rebuild the machine, which would have been a bit drastic, but it was enough just to insert the Snow Leopard upgrade disk and re-install the OS. Takes about an hour but you do not have to re-load everything else, and it completely fixed the battery life issues that it was causing on my MacBook Pro. I would still take a back-up of your data before you do this, though!
  15. Anuba macrumors 68040


    Feb 9, 2005
    I've had this happen two times...

    Once it had to do with Spotlight trying to index torrent files as they were coming in. Since the files keep changing by the second (duh), Spotlight wanted to index them again and again and again until the system was about to implode from the runaway CPU usage.

    That was long ago and I don't remember how it was resolved... either the torrent client was updated or OS X was, but either way, it's a non-issue now.

    The other time was when I used a script to auto-mount my NAS drive. Since OS X can't do this automatically in any convenient way (you can add the NAS shares to the Login Items pane, but then it cascades a bunch of nasty Finder windows every time you boot up the system), I thought I was being clever using some script that was supposed to address this very issue... but then I found that every time I booted up the system, the fans would rev up to blowdryer speed and the system remained largely unresponsive for about 5 minutes until everything suddenly cooled down. Once again mds (and another related process, the name escapes me) was the culprit. I'm not sure what happened, but I'm guessing that Spotlight went bonkers trying to index a whopping 2 TB of files over WiFi for no apparent reason.

    I don't know if that helps but there you go.
  16. Tim018 macrumors regular

    May 31, 2009
    Do you have bootcamp installed? if you have windows "something" installed i found it sent the mds process outta control. it tries to index the ntfs drive and it freaks out- im guessing because of the windows file format or something. try adding your bootcamp drive to the places not to index under the spotlight prefs...

    if you dont have bootcamp installed then nevermind :)
  17. jpoterbin macrumors newbie

    Aug 23, 2010
    Corrupted Flash Drive

    Could be a corrupted Flash drive. I had a similar problem and I tried everything except keeping a close eye on the flash drive. Once a disconnected it and restarted the computer everything was fine. And make sure you disconnect the drive before restarting the computer. It was a sigh of relief for me as I just bought the computer 10 days before.

    Also I wasn't able to salvage the drive. Disk utility would let me repair it or reformat it. So I just grabbed the files I needed and ditched the flash drive.
  18. javks macrumors newbie

    Jan 20, 2009
    well I had the same prob since I installed bootcamp, when I saw the answer that told to put the disk in privacy mode I remembered that the problem could be spotlight running trough the bootcamp partition.. I changed the bootcamp partition to private and immediately mds stopped hogging the cpu so I guess that was the prob, hope so
  19. valor macrumors newbie

    Sep 15, 2006
    Seattle, WA
    thank you thank you!!!
  20. Manul macrumors newbie

    Mar 13, 2011
    Antwerp, Belgium
    Thank you. It worked for me, it seems spotlight is having trouble scanning a bootcamp partition.
  21. miguelh3000 macrumors newbie

    Mar 16, 2011
    Wow, finally the answer! My Spotlight would stay on a constant search when being used for simple things such as searching for "dictionary," Spotlight would correctly find and display the app "Dictionary" as first on the Spotlight result list but the Spotlight search would never end (Spotlight gear icon would continue to spin) and mds would end up huggin up my CPU.

    Tim, thank you from the bottom for my heart :)
  22. mjuarez macrumors newbie

    Mar 7, 2009
    Well, my MacPro just went berserk with Spotlight. mds was eating up 5Gb of RAM, and 14Gb(!!!) of virtual RAM. Never had done that before, so I was a bit perplexed at first. I managed to kill mds with Activity Monitor, but then it immediately started indexing again.

    I then excluded these folders on the Privacy tab in Spotlight System Preferences (was running µTorrent and Fusion at the time)

    - Virtual Machine folders (Fusion, Parallels, VirtualBox).
    - Torrent folders.

    Like somebody else said, these files keep changing all the time, but you don't want Spotlight to re-index these. I just did that, MacPro came back to life.

    This should be a pretty simple bug to fix in Spotlight, not sure why it's still an issue. And also, based on this thread, it's quite old. I wonder if Fusion and/or µTorrent are not using the "approved" filesystem API's for updating files.
  23. JDEinFLL macrumors newbie

    Jul 22, 2010
    Isolated VMWare Fusion

    I noticed a couple posts in this thread about finding success by not indexing a bootcamp partition. I'm not running bootcamp, but I am running VMWare's Fusion, so I thought I'd see if adding VMWare's Fusion application and the Virtual Machines folder (in the documents folder) to Spotlight's Privacy list would stop mds from running wild and sure enough - it did. Since I don't use spotlight to search for anything associated with Fusion or Windows there's no lost functionality, only disk drive and cpu harmony.
  24. Spidey67 macrumors newbie

    Jan 15, 2016
    I also had this problem and placed my virtual machine (Parallels) folders under the System Preferences/Spotlight/Privacy Tab and now mds, mds_stores, and mdworker are no longer CPU hogs. You tip helped me a lot. Thanks!
  25. JohnDS macrumors 65816

    Oct 25, 2015
    It is a good idea to put your DropBox folder into Privacy too.

Share This Page