OS X Spotlight Slowdown
March 21, 2007
I’ve been tracking an annoying “slowdown” on my MacBook Pro for awhile now; just every now and again, the system will seem to take an inordinate amount of time to do something, and then clear back up again.
This often seemed to involve mounting or dismounting external volumes.
Looking at this in Activity Monitor, I found that the “MDS” process was taking 90%+ of the CPU, and about 1.5GB of physical memory. Digging around in Console, I also found a bunch of crash logs.
MDS is the OS X Spotlight indexing service which, much like an over-eager spaniel, decides to sniff a new volume to death whenever you try to mount it. Worse, it will occasionally pine away for a dismounted volume, chewing up CPU time and memory trying to find it.
It appears to be particularly problematic if you have a removable drive that’s a duplicate of the boot drive (such as you might have, for instance, from doing a clone backup).
My first instinct was to just disable Spotlight and its sniffer routine entirely; I only use it once in a blue moon, but I was a little reluctant to just shut it down altogether.
Worse, the obvious approach to curing Spotlight by telling it what to ignore (adding items to the Privacy list in System Preferences) appears to be often worse than the disease.
Fortunately, the Fixamac folks have a little utility to housebreak Spotlight, named (appropriately enough) Spotless.
Spotless will let you shut down Spotlight entirely, or disable it on whatever volumes you want it disabled on. I shut it down on all volumes other than my internal hard drive and my “media storage” volume, and lo and behold, the slowdown is gone.
The downside is that Spotlight is a $13 piece of shareware; on the other hand, I think I got more than $13 worth of speed back.