Re [ltp] Problem with updatedb

Tod Harter linux-thinkpad@linux-thinkpad.org
Mon, 25 Aug 2003 13:07:34 -0400


There's nothing hazardous about not doing an updatedb, except the database=
=20
will get out of date.=20

The 'renice' part of your script bumps the process priority of the script=20
itself way down, which is an attempt to make it not interfere too much with=
=20
other stuff like your desktop.=20

The actual updatedb command options are just telling it not to index tempor=
ary=20
files and network mounted file systems.

There are a number of reasons why renice isn't very effective, 1) you have=
=20
little enough ram that even though it only runs 'in the background' it stil=
l=20
keeps forcing massive swapping to occur. 2) it schedules lots of disk I/O=20
which ties up the disk drive and also forces more useful pages out of the=20
linux page cache. 3) Linux still isn't really all that preemptive.

Personally I'd just have that cron job run once a week or even once a month=
=20
depending on your usage.

On Friday 22 August 2003 03:40 pm, Bernard DEBREIL wrote:
> Thanks to everyone for the hints on updatedb calls.
>
> Here is the contents of my slocate file:
>
> [bd@localhost cron.daily]$ more slocate.cron
> #!/bin/sh
> renice +19 -p $$ >/dev/null 2>&1
> /usr/bin/updatedb -f "nfs,smbfs,ncpfs,proc,devpts" -e
> "/tmp,/var/tmp,/usr/tmp,/a
> fs,/net"
>
> I can't make much out of that, except that it calls on updatedb with the
> option -f for the processes listed in between quotes. As for the renice
> process with the options that follow, I would have to spend a lot of time
> reading the man pages so as to really understand what it does, which
> priorities it changes on what processes, and what I could do to improve
> my system. I now think that it would be too hasardous to stop the process
> of automatically calling 'updatedb', maybe just as much hasardous to try
> modifying the slocate file.
>
> Thanks anyway.
>
> >>>>>>>>>>>>>>>>>> Message d'origine <<<<<<<<<<<<<<<<<<
>
> Le 8/21/03, =E0 4:21:31 PM h, James Mckenzie <jjmckenzie51@earthlink.net>
>
> vous a =E9crit sur le sujet suivant Re [ltp] Problem with updatedb:
> > Bernard:
> >
> > Take a look at the anacron and anacrontab man pages.  The file that
> > calls updatedb is slocate and is in the /etc/cron.daily.  You can stop
> > this process, however read up on what the updatedb process does before
> > shutting down the process.
> >
> > What interested me most is the line before the call to updatedb that
> > "renices" all of the existing processes before calling the updatedb
>
> process.
>
> > This line that "renices" all processes might be what you want to modify,
> > rather than removing or halting the updatedb process.
> >
> > James McKenzie
> >
> > Bernard DEBREIL wrote:
> > >Hi to everyone,
> > >
> > >Every now and then, but more often than not, my system (RedHat 7.2 on a
> > >TP600, RAM 128MB) automatically performs an 'updatedb'. The process
>
> takes
>
> > >several minutes, time during which every other task is being reduced to
> > >near zero speed. At times, it is becoming very annoying.
> > >
> > >I wonder if I could modify something in my config so that 'updatedb' is
> > >not being performed automatically. Could someone tell me something abo=
ut
> > >it, and, also, what problems could possibly be occur following such a
> > >change ?
> > >
> > >With my other computer (running on RH 6.0), I don't have this automatic
> > >launching of 'updatedb'. True enough, I don't use 'pan' on that one, a=
nd
> > >I am under the impression that the calls on 'updatedb' could possibly =
be
> > >launched by this software.
> > >
> > >Thanks in advance for any hint,
> > >
> > >Bernard DEBREIL
> >
> > --
> > The linux-thinkpad mailing list home page is at:
> > http://mailman.linux-thinkpad.org/mailman/listinfo/linux-thinkpad

=2D-=20
Giant Electronic Brain
Internet/E-Commerce Consulting Services