update-db cron job: solving a long-standing issue

Thilo Six T.Six at gmx.de
Sun Sep 16 09:03:08 UTC 2007


Scott Kitterman wrote the following on 16.09.2007 00:43

<snip>

> I use locate regularly on desktops and servers.  If there are locate 
> variants that update synchronously rather than once a day, I say looking 
> into that is the best answer.  

would that slowdown file operations (mv, rm, cp)?

> It would both eliminate the daily cron job 
> system slowdown and the primary limitation of locate (that it doesn't know 
> about files added since the cron job has run).
> 
> For experienced administrators I think the absence of locate would be quite 
> suprising.

Yes i think also the absence of 'locate' would be suprising to anyone who has
used any distro before.

...and at least on kubuntu that would change s.th.:
$ aptitude show kubuntu-desktop | grep kio-locate
         keep, kfind, kghostview, khelpcenter, kicker, kio-apt, kio-locate,
                                                                  ^^^^^

Personaly i:
$ diff updatedb.conf.orig /etc/updatedb.conf
20c20
< NICE=10
---
> NICE=14

and

$ cd /etc/cron.daily/
$ sudo mv find.notslocate ../cron.weekly/
$ sudo mv slocate ../cron.weekly/

of course that´s only my personal setting (YMMV), but that it is the best
compromise between 'do not have locate at all' and 'resource intensive cron
each day'.

And imho updatedb seems to be much smarter today then in previous releases.
e.g. when you delete a file it doesn´t show up right after in locate anymore.
I don´t know if that already happens, but the same way updatedb could be
instructed to do a 'delta' only and leave unchanged files alone (instead of
update the whole db each time).

> 
> Scott K
> 

-- 
Thilo

key: 0x4A411E09





More information about the Ubuntu-devel-discuss mailing list