tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: Disabling disk caches [Re: CVS commit: src/lib/libc/sys, re sync(1)]

On Wed, Mar 25, 2009 at 09:44:52PM +0000, Andrew Doran wrote:
> > Should we have a list of filesystems and whether they work properly?
> > Crossreferences to mount_foo(8) for all foo? Or should it just contain
> > Kirk's advice, that is, people who care about their data shouhld
> > always disable the write-back cache?
> I think we should:
> (a) Automatically disable the disk write cache the moment a file system is
>     mounted on the disk, unless that file system is known to handle caching.
>     For our purposes, that leaves logging ffs and zfs (and whatever other
>     modern file systems come along) with the cache enabled.
> (b) Change mount to flush the disk cache as a test, if r/w mount. If we get
>     an error, send a warning message to the log. This will help us to get
>     broken disk drivers fixed.
> Comments?

You are assuming that power can fail in a way that doesn't allow the
disk to write back the cache. For example, laptops are not effected by
this under normal usage as they have emergency power-down logic when the
battery level drops below a certain limit.

In my opinion it simply something a system operator / user should know
about, disabling write caches randomly will just give the impression of
very poor performance for many typical systems.

(b) sounds reasonble.


Home | Main Index | Thread Index | Old Index