PDA

View Full Version : Auto-update Locate Database


Jeff Mincey
03-27-2006, 12:36 AM
I hate to start a thread on what is such a granular and minor issue, but I notice that with the RHEL distro at least, RH does not have the locate database set to update by default. I don't know if many people have occasion to rely on the locate command, but I use it from time to time and have heretofore rebuilt the database manually in order to keep it current -- that is, until today when I finally configured it to auto-update.

I really see no trade-offs in changing the default config for auto-update (the storage impact is negligible), so I recommend this to RH.

retep
03-28-2006, 12:29 AM
The slocate rebuild job uses (a lot!) of disk IO.

Maybe not such an issue if it is just you on a server, but there are lots of other users there as well. If they were all to be regularly running slocate rebuilds then you will notice that your performance is impacted (significantly).

The slocate database should be correct to begin with. You can manually rebuild the database if you need to at any point, no problem. I would advise against doing regular, cron-ized rebuilds unless you really need to.

Jeff Mincey
03-28-2006, 03:06 AM
I hadn't considered the I/O implications of this operation. I had thought (perhaps wrongly) that the time required was inconsequential and that one could schedule it during off hours (assuming the lack of a global constituency for one's web site). In any event, I suppose you make a good point that one can always rebuild it on the spot when the need dictates.

Just for the record, I wasn't proposing that each individual user account maintain its own slocate database but rather that a single one be maintained for sys-admin purposes.

Anyway, thanks for the reminder that such things have I/O ramifications. I'm now re-evaluating whether to return this to manual only.