[Techtalk] updatedb hard drive thrashing

Mary mary-linuxchix at puzzling.org
Sun Jun 22 23:56:30 EST 2003

On Sun, Jun 22, 2003, ed orphan wrote:
> I'm running Red Hat 7.3 and every so often, while I have KDE going,
> the hard drive starts to work very very hard. It sounds like it's
> thrashing.  So I got into root and ran top. The problem seems to be a
> program called   updatedb.  It was gobbling up CPU time and working
> the hard drive very hard.  Is updatedb an important program? Can I axe
> it?  What does it do?  Even when I close down KDE, and exit the user
> account, and I'm just in root on the command line, it keeps going. I
> have to do a shutdown and re-boot to make it stop thrashing the hard
> drive.  Does anyone else have this problem?  Any information on
> updatedb would be most welcome!

Updatedb is a program that updates the locate database. You can use
locate to find files on your disk very quickly. For example, "locate
pdf" finds all the pdf files on my system in just over a second. Doing
an actual search of the harddrive would take much longer (so long that I
don't want to test it for the purposes of this mail).

The reason it can do this is that updatedb has stored the name of every
file in a database on my system. updatedb itself finds all the files by
searching the entire disk once a day - hence the thrashing. (I once
heard a joke along the lines of "It's 6am, do you know why *your* Debian
machine is thrashing?" because the updatedb cron job runs at 6am on
Debian systems that use the default findutils setup.)

So the answer to "is it an important program?" depends on whether you
use the "locate" command a lot. Fellow Red Hat users might be able to
tell you how to uninstall (or more likely, disable) it.


More information about the Techtalk mailing list