Title: Continuous disk access
Author: Sandro Tosi
Last modified: 2005-09-17
It might happened that you wonder `What the hell is accessing my
disks: I'm doing nothing!'.
Ok, first of all, explain what ``nothing' is; if you're burning a CD,
you have to access the file to burn, and even if you're running a
peer-to-peer program, disks accesses are normal. So make sure that
really nothing ``strange'' is running on that machine; following the
usual culprits:
o Filesystem type
Do you know what filesystem is on your disks? On recent
installation there will be journaling filesystems. Such filesystems
commit changes to disks at interval (for example, default EXT3
interval is 5 seconds), so if you noticed such regular access,
maybe they are due to the filesystem and so you don have to worry
about it.
o ATime mount option
For every file in the filesystem, the inode records three times:
change, modify and access time; try
$ stat <a_file>
to see them. The atime (access time) it's written every time a file
is accessed, even if the file is cached in RAM and so no disk
access is needed. If an application keeps read a file (so it will
be cached), the atime is written all the times, accessing
disk. Since it's a mount option, to disable it you have to modify
the /etc/fstab (or the mount command line) adding ``noatime'' into
filesystem options. I've read this option increase the throughput
of kernel.org of about 25%.
o slocate/updatedb
These programs do a full disk search for updating the ``locate''
database. When they are running you can see a huge stress on
disks. You can even think to remove from cron daily run (default
configuration) to put in weekly or manually execution.
If the common causes before don't work, you could always
# echo 1 > /proc/sys/vm/block_dump
and monitoring the disk accesses with dmesg.
|