Other Sources of I/O

This section provides information about processes other than kupdate which may spin up your disk. This section is based on observations of my own system; your system is likely somewhat different.

Table 1. Some causes of disk spin-up

ProcessActivityAction
bdflushbdflush writes modified data to disk when the percentage of dirty buffers exceeds a threshold.bdflush doesn't actually cause many spin-ups on my system. If it does on yours, you can tune the threshold using /proc/sys/vm/bdflush. See the section "nfract" in Documentation/filesystems/proc.txt for details.
syslog Some log files are written to synchronously.Decide if the log files are important enough to justify the spin-ups. You can determine which log files are causing the spin-ups by comparing the timestamps on the log file entries with the the time at which your drive spun up. To disable synchronous writes for a particular log file, precede the name of the file in your syslog.conf with a "-". For example:
		  lpr.* /var/log/lpr.log
		
would become
		  lpr.* -/var/log/lpr.log
		
xscreensaverI had it set to random mode, where it would switch screensavers every 10 minutes. This means it had to load new code from disk every ten minutes. You could

  • Disable random mode

  • Change the cycle time for xscreensaver (see the documentation on the cycle option)

  • Load the modules before spinning down the disk. This assumes that you have enough memory so that the modules will not be ejected from the buffer cache before they are needed. To do this, you could do something like cat /usr/lib/xscreensaver/* > /dev/null

xfsAs I visited different web sites, or changed the size of the font used to render the current web site, xfs needed to load in new fonts.Preload fonts in the same manner as preloading screen saver modules.

bash% for x in `find /usr/X11R6/lib/X11/fonts -type f`; do cat $x > /dev/null; done

pineWhen I used a feature that I had not used earlier, the disk spun up. This is probably because the code is paged in on demand, so the code for that feature had not been read into memory yet. Preload the executable:

cat `which pine` > /dev/null

mozillaSimilar to pine.Preload the entire Mozilla package. Also, I disabled the disk cache, as I would rather have Mozilla fetch the document from the network than spin up the disk.

for x in `find /usr/lib/mozilla-cvs`; do cat $x > /dev/null; done

sadcCalls fdatasync() after writing the system activity data.Either reduce the frequency with with sadc runs, or just eliminate it entirely. I did not see any option to disable fdatasync() in sadc.

What if you try all these things, and the disk still spins up too often? Figuring that out is a little trickier, and is described next.