'updatedb' : is it really mandatory, can I switch it off and how ?!

Cameron Hutchison camh+ubuntu at xdna.net
Sat Nov 27 21:45:13 UTC 2004


Once upon a time Duncan Anderson said...
> 
> On any UNIX or Linux system, you can expect a small hard disk access at 
> regular intervals, usually every 30 seconds(but this may vary). It is a 
> process called "syncing" and it is necessary for keeping the 
> superblock/freelist updated on each file system. Don't worry. It is 
> completely normal.

This doesn't necessarily need to happen. A sync is only needed if there
are dirty blocks that need to be written to disk. If you are not writing
anything to disk then you should not have any dirty blocks - except for
recording file accesses.

Recording of file accesses can be stopped by adding the "noatime" option
to the filesystems in /etc/fstab. For each filesystem with the noatime
option, when files are accessed, the time of access will not be recorded
against the file. In almost all cases this is not a problem. The only
one I know off hand is the mail spool and other mail files. A mail
program may use it to see if there is new mail in a file (modify time is
later than access time).

One other culprit of frequent disk activity is postfix. If you are not
using mail on your local machine, you may want to try turning that off
to see if that quietens your system:

$ sudo /etc/init.d/postfix stop

That will only stop it until the next reboot. If you find that does make
a difference for you, you may want to investigate an alternative mail
server that does not write to disk as often as postfix.






More information about the ubuntu-users mailing list