Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 21 Jun 2009 21:41:38 +1000
From:      Andrew Snow <andrew@modulus.org>
To:        Dan Naumov <dan.naumov@gmail.com>,  freebsd-fs@freebsd.org
Subject:   Re: ufs2 / softupdates / ZFS / disk write cache
Message-ID:  <4A3E1C72.6000406@modulus.org>
In-Reply-To: <cf9b1ee00906210341j7afe65b4kb588f6b9b56df0f0@mail.gmail.com>
References:  <cf9b1ee00906201429y7ec68afdse66be30fc2f75e8f@mail.gmail.com>	<20090620231130.GA88907@owl.midgard.homeip.net>	<3c1674c90906201808t1854dd46n82213fbd0c1c254c@mail.gmail.com>	<cf9b1ee00906201918w1bc7063bw641cfc768ee33398@mail.gmail.com>	<20090621092736.GA92656@owl.midgard.homeip.net>	<cf9b1ee00906210303l5b54bfaau28e253ce4e674592@mail.gmail.com> <cf9b1ee00906210341j7afe65b4kb588f6b9b56df0f0@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Dan Naumov wrote:
> Actually, if it is possible for ZFS to issue "flush the cache NOW"
> commands directly to disk every 5 seconds by default (value tunable) I
> see 2 potential options/changes that would make the life of
> "UFS2+softupdates on SATA disks" users a whole lot easier.

I believe you might be barking up the wrong tree here.

The issue with cache flushing is not that changes are written to disk - 
that happens anyway, eventually, even if you don't explicitly flush the 
cache.

The big issue is that things get written to disk in the correct order so 
that the system can recover from an unexpected crash.  Even if the cache 
gets flushed every 5 seconds, things on UFS could get still get 
corrupted between T=0 and 4.9s, if the system writes something and 
expects it to be written syncronously and it is isn't.

The only truly safe bet here is to turn disable the ATA write cache tunable.

Folks who need to maximize safety and can't afford the performance hit 
of no write cache need to do what they always have had to do in the past 
- buy a controller card with battery-backed cached.


- Andrew



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4A3E1C72.6000406>