Is MDS taking over your CPU on OS X? Try Spotless.

My 5 month old MacBook Pro often has the MDS process chewing about 45-50% of CPU at various points in the day. Given that MDS is supposed to sit around and casually index – so that Spotlight can quickly perform a search, this CPU usage pattern is a red flag. Chances are something is wrong with either the disk or the Spotlight metadata index [what MDS manages]. After using Disk Utility to verify the volume, I tried Spotless. It worked great.

spot10.jpg

Spotless is a nice little $15 nagware utility made by Fixamac Software that helps you delete and recreate the Spotlight metadata folder and index, so that it can let MDS rebuild from scratch. It offers a few other moderately useful features, but if MDS is getting aggressive, this makes it real easy to get a clean rebuild.

Update 8/11/09: [JS points out](https://www.expandrive.com/2007/06/24/is-mds-taking-over-your-cpu-on-os-x-try-spotless/comment-page-1/#comment-17933) comments that you can instruct MDS to clear out the metadata cache and rebuild from scratch using this command run from Terminal:
sudo mdutil -avE

This is effectively what Spotless does, but without the user interface.