Macos – Why does MDS run wild in Mac OS X 10.6

cpu usagemacosmdsosx-snow-leopardspotlight

I've been having trouble with the MDS process running wild on my MacBook Pro 13". I've read on other support forums indicating that improperly formatted external drives can be an issue, but I have no drives connected. How can this problem be debugged and fixed?

If it helps, I do have a massive Mail archive. I have not turned off the indexing of this archive, because I haven't been able to find a correlation between the two, but I'm considering it.

(This might be normal right after doing an upgrade from 10.5 to 10.6, in which case the Spotlight search index needs to be rebuilt by mds. But in this case it's been a few weeks.)

Best Answer

To see what mds and more importantly its child mdworker is actually doing - use fs_usage to log what files it is opening:

sudo fs_usage -w -f filesys mdworker

Though there is a lot of unintelligable stuff in there, it does tell you when it opens a file to begin reading from it. Copying a PDF into my filesystem shows mdworker opening the file then immediately after lots of activity...

p.s. if you want a little less detail, this will just list the open file points:

sudo fs_usage -w -f filesys mdworker | egrep "open"
Related Question