non-stop disk activity

Per Bothner per at bothner.com
Thu May 13 18:14:07 UTC 2004


Tommy Reynolds wrote:

[Thanks for your quick and helpful reply!]

> Uttered Per Bothner <per at bothner.com>, spake thus:
> 
>>First, the cpuspeed daemon writes out a log message
>>May 12 10:37:34 kelso kernel: longhaul: FSB:133 Mult:5.5x
>>multiple times a minute.  This is due to a dprintk ...
> 
> Kernel log messages are handled by the syslog daemon.  You can edit
> the file "/etc/syslog.conf" to control where kernel messages of a
> certain priority are logged such as "/dev/null".

But I really shouldn't have to do this.  It's clearly a bug that Fedora 
[I didn't mention that this is FC2 test3] spews out all these log messages.

As a workaround I can figure out how to turn off this message [though 
specific instructions would be most appreciated], but I'll report this 
as a bug on bugzilla.

> The cron daemon is going to wake up every minute and scan its
> crontabs, even if no work needs doing?  How else is it going to know?

It can schedule itself to wake up the next time something is scheduled. 
And isn't it possible to have the kernel notify it on changes to files 
or directories it is monitoring.  This may not have been possible in the 
old days of Unix, but doesn't Linux now have a notification capability?

Of course spending the time to rewrite something that works reasonably 
well is a different matter.  But hopefully somebody will do so.

> Just turn off the cron daemon when you want low-power mode; some
> essential system maintenance (such a log file rotation) isn't going 
> to get done so either do it yourself or enable cron overnight once in
> a while.

A compromise might be to add a cron option to wake up less frequently, 
like once ebery 15 minutes.  I'll take a look at the cron sources.

It also seems likely that waking up the processess every minute doesn't 
really cost much, as long as I can keep it from spinning up the disk all 
the time.  I'll try shutting off or running less frequently the more 
frequent cron jobs.

>>/usr/lib/sa/sa1 is run every 10 minutes, and I'd like to turn
>>that off or run it less frequently.  (I assume this is
>>"system accounting" but I'm not sure).
> 
> Yet another cronner.

Is there a way to turn this off or run it less often without disabling cron?

> The rules say that the filesystem must update the time of last access
> of every open file every second.

But why does it need to write this out to disk eagerly?  If the
system crashes without the last access time being up to date, why
would anyone care?  Why not just update the kernel data structures when 
a file is accessed, and write it out when the last file open on that 
inode is closed?

> If you don't want this, just edit
> "/etc/fstab" and use the term "noatime" instead of "defaults" for
> every hard drive partition line there.  This can result in a
> significant savings in disk traffic on a lap top or a huge enterprise
> system.

That sounds like the default should be "lazy atime" as I suggested.
-- 
	--Per Bothner
per at bothner.com   http://per.bothner.com/





More information about the fedora-list mailing list