PART I: TEST TO DETERMINE IF MDS IS REALLY THE CULPRIT
Let's disable mds to see how your Mac runs without it. The goal here is not to leave you with no mds (because that would break the ability to search for lots of stuff on your Mac) -- you'll just disable it temporarily to see if your memory is freed and your performance issues go away. In other words, we're just confirming that the
only problem you have is mds.
Open the "Terminal" application. You'll find it in the Utilities folder. e.g. in Finder, click "Applications" -> "Utilities" -> "Terminal"
From within the Terminal window, type the following command (this will shut down 'mds'):
sudo launchctl unload -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
You will be prompted for a password, this is because you used the "sudo" command which allows the following command (in this case "launchctl") to be run with elevated privileges. If this was the first time you ever used the "sudo" command you get an extra lecture about using it responsibly (mis-using the "sudo" capability can really mess up your computer. No playing around with sudo!)
The password it wants is
your login password (since you are an 'admin' user).
If you check the list of running processes in "Activity Monitor" you should see that 'mds' is no longer running.
Test your computer's performance and amount of available RAM. Did this fix the performance issues?
If so, you really don't want to leave it this way. We haven't fixed anything... we've just isolated the problem to 'mds' and verified that if 'mds' isn't running then the symptoms go away.
Two things to note:
1) 'mds' will
not start the next time your Mac is rebooted (the launchctl command told the Mac's launch services that you don't want this process started anymore.)
2) You can tell 'mds' to restart by repeating the above command, but replace the word "unload" with "load". This starts mds and tells launch services that you do want this service started automatically.
sudo launchctl load -w /System/Library/LaunchDaemons/com.apple.metadata.mds.plist
PART II: REBUILD THE METADATA INDEX
Before continuing, re-enable 'mds' using the command above.
The normal way to repair an 'mds' service gone haywire is to rebuild it's indexes. Apple's prescribed way is here:
http://support.apple.com/kb/HT2409
But that's basically what I already had you do earlier in this thread. If you're not confident that your dragging & dropping of the Macintosh HD had the correct effect, then we could have you use the command line method. There's more typing, but there's also more control and ability to make sure it's done correctly.
To use the Terminal window (if you rebooted, you'll need to open another Terminal window) to rebuild your indexes, eject / remove any external volumes so that the only disk available on your Mac is the boot disk, then type these commands...
First, switch off Spotlight indexing by typing this:
sudo mdutil -a -i off
This switches the indexing off ("-i off") for the metadata stores on "all" (-a) mounted volumes. You should have seen a message that looks similar to this:
/:
Indexing disabled.
Second, erase all the metadata stores by typing this:
sudo mdutil -E -a
This "erases" (-E) the metadata stores (the searchable indexes created by Spotlight) on "all" (-a) mounted volumes.
Checkpoint: At this point, (1) the 'mds' process should be running, (2) the indexing should be off, and (3) the metadata stores have been erased.
Before re-enabling the index (which would cause it to immediately start rebuilding a new index), check the 'mds' process in Acitivity Monitor. Is it still consuming massive amounts of CPU or has it settled down?
You might also stop & restart 'mds' (use the "sudo launchctl unload -w ... " and "sudo launchctl load -w ... " commands listed above.)
'mds' is running, but you've erased the index and you've disabled indexing (which means it wont be trying to rebuild the index right now.)
*At this point* your 'mds' process should
not be gobbling up extraordinary amounts of CPU or memory. If it is, then +something else+ is wrong beyond just index corruption.
Finally, re-enable indexing by typing this:
sudo mdutil -a -i on
Check the Activity Monitor again. At this point there should be a few md... processes that are quite active (because the system is rebuilding your indexes, so there is quite a bit of work being done.) This could take a few hours. Once it's finished, check Activity Monitor one last time to see if 'mds' is behaving better.
Message was edited by: Tim Campbell1