Wednesday, March 12, 2008

Disabling Mac OS X spotlight, or how to make your life complicated

Since my previous laptop is temporarily out of service, I am using a new one with Mac OS X Leopard. Which is cool, and it has great enhancements. However, after a few hours of usage, I noticed a sudden increase of CPU activity (+50%), for no apparent reason.
The resource monitor fingered a process named "mdworker", and Google took me to a page explaining that the real culprit is spotlight, which is indexing the disk contents.
Since I needed all the CPU power of my laptop to compile the latest server, I asked Google again, and I found a page with a method to disable Spotlight permanently. The recommended method involves root access, changing attributes of a long list of files, and a reboot. (!!!)
I could not afford the luxury of a reboot at the moment (and the instructions looked too obscure for my taste), and therefore I used an alternative (and more Mac-ish) way. I opened the spotlight options in System Preferences, found the privacy section, and added the whole Macintosh HD to the list of places not to index.

Ten seconds later, the CPU activity was back to normal.
I have enabled again the spotlight indexing during the night, and all is well.


Mike Kruckenberg said...

Great tip. I like Spotlight but only remember it's there and use it once a year so makes a ton of sense to disable.

Unknown said...

Ah.. yes, the wonderful resource hogging indexer. I didn't know Spotlight was that bad. I know that for Windows machines, the first thing I did was stop the indexing service.

Why do OS devs think this is something that should be on all the time? Why can it not be scheduled?