Any way to schedule Spotlight indexing?

Since upgrading to Tiger, I notice my computer's hard drive activity is much more frequent with Spotlight updating the index while I surf the web, work with iCal, whatever. Nothing out of the ordinary for Spotlight, as far as I can tell, but I'd like to reduce the hard drive "chatter" without turning Spotlight off completely (via Spotless).

Any tips for turning "down" the frequency of indexing files? I would love if we could manually update indexes for searching, like in Panther.

Thanks for any help you can offer!

Dual 2.0 G5, Mac OS X (10.4.10), 3 GB RAM

Posted on Oct 5, 2007 5:47 AM

Reply
6 replies

Oct 10, 2007 2:51 PM in response to JeffP.

Not a contradiction because the data written to the index is usually quite small compared to the size of the file being written to disk at the same time. For example, with images - when you save the file to disk, it may be a 5MB file. When written to disk, it may trigger an associated write of 10KB of metadata.

For documents with a lot of text, there would be a scan of the file as Spotlight pulls out the unique terms in the file to add to the content index, but even this will be quite small compared to the actual file. So, the extra overhead specifically due to Spotlight normally shouldn't be noticed. Essentially it adds a relatively insignificant secondary write to the larger original disk write that you initiated when you saved or copied the file.

If you are noticing a lot of extra activity with iCal or when surfing maybe there is something else going on. With iCal and Safari open, mds and mdimport are sitting quietly at 0% CPU and not adding much of anything to disk writes except when first opened for me.

As for using Spotless, et al, people have found that they are unable to get Spotlight to find anything even after they try to turn off the effects of Spotless. This may be due to them trying a cocktail of methods to alter Spotlight behavior and then not knowing how to reverse all the steps.
Just in the the 2.5 years that I've been on Tiger and been dealing with Spotlight, it seems to work the best when you just let it work and not try so hard to fix it.

For more info on how Spotlight works, take a look at the Spotlight Technical Brief

Oct 9, 2007 6:59 PM in response to JeffP.

After the initial indexing, Spotlight indexes as files are written. Whenever a file is saved, it is passed through the mdimport server which determines which Spotlight Importer is associated with the particular file type and gleans the indexable data from the file as it's on it's way to the hard disk.

That is the key to Spotlight's functionality - if it didn't index on-the-fly for each file, it would have a bigger resource footprint.

Now, personally, I think you should generally avoid using Spotless or any other method (except maybe the Privacy pane) to alter Spotlight's behavior because it seems to potentially cause issues when trying to turn it back on. You really shouldn't notice too much activity specifically attributable to Spotlight. To check, keep an eye on mdimport and mds in ActivityMonitor.

Oct 10, 2007 9:38 AM in response to Mike-N-nahyunil

Thanks for the replies.

@Mike:

+"You really shouldn't notice too much activity specifically attributable to Spotlight. To check, keep an eye on mdimport and mds in ActivityMonitor."+

Then,

+"Whenever a file is saved, it is passed through the mdimport server which determines which Spotlight Importer is associated with the particular file type and gleans the indexable data from the file as it's on it's way to the hard disk."+

Don't these two sentences contradict one another? The extra hard drive noise I'm hearing is a direct result of the process described in the second sentence (having watched mds in Activity Monitor). With Panther, I didn't have a fraction of the hard drive activity when performing simple functions like opening iCal or surfing the web.

+"I think you should generally avoid using Spotless or any other method (except maybe the Privacy pane) to alter Spotlight's behavior because it seems to potentially cause issues when trying to turn it back on. "+

Could you be more specific as to what kind of issues? I was under the impression Spotless was just a friendly UI for terminal commands...

Oct 10, 2007 5:30 PM in response to Mike-N-nahyunil

+"If you are noticing a lot of extra activity with iCal or when surfing maybe there is something else going on. With iCal and Safari open, mds and mdimport are sitting quietly at 0% CPU and not adding much of anything to disk writes except when first opened for me."+

If I go to a new website, after the page loads, I'll get a brief shot of mds working at say .3 to 1.2 CPU usage for a second. This tells me Spotlight must examine every bit of data written, +even browser cache changes+, in order to do it's job. Not a heavy load for my dual G5 mind you, but this is excessive hard disk activity, nevertheless. I just don't like the idea of so much unnecessary disk usage (and the resulting extra ambient noise) for something like web surfing, which produces no files which need to be indexed.

+"Just in the the 2.5 years that I've been on Tiger and been dealing with Spotlight, it seems to work the best when you just let it work and not try so hard to fix it."+

It seems to work well for the mostpart, but there are some areas which definitely need fixing. What I'm asking may be beyond the usual scope of Spotless, but the utility was developed out of a need to overcome several of Spotlight's shortcomings. I believe Dr. Smoke covers these quite well on his site/book.

Thanks again for the reply.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Any way to schedule Spotlight indexing?

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.