Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 24 Jan 2011 14:56:48 +0000
From:      Karl Pielorz <kpielorz_lst@tdx.co.uk>
To:        Bruce Cran <bruce@cran.org.uk>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: Write cache, is write cache, is write cache?
Message-ID:  <DF3B02CFFAFEC6344F08045B@HexaDeca64.dmpriest.net.uk>
In-Reply-To: <20110123221651.000037f2@unknown>
References:  <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan>	<D8077758CFED5EF1CB2AB613@Octa64> <20110122172714.00002274@unknown>	<1032CC037935BA2DC2E60A4F@Octa64> <20110123221651.000037f2@unknown>

next in thread | previous in thread | raw e-mail | index | archive | help

--On 23 January 2011 22:16 +0000 Bruce Cran <bruce@cran.org.uk> wrote:

> You might also find http://brad.livejournal.com/2116715.html
> interesting.

Ok, the utility provided via the Blog reports zero errors when run from 
both UFS, and ZFS with the BIOS set to 'Enabled drive write cache: No'.

Flip the BIOS to 'Yes' - for UFS, things get messy (as you'd kind of 
expect) - the file system gets trashed (enough that autoboot / background 
checking fails), and you can't complete the test because the test file 
doesn't exist after reboot (side effect of softupdates I'd guess).

For ZFS the test still completes - with 'zero errors'. Checking via 
'camcontrol' - the BIOS option 'Enabled drive write cache' just seems to 
affect the 'Write cache enable' features on the drive, i.e.

"
test# camcontrol identify ada0 | grep -E "(Feature)|(cache)"
Feature                      Support  Enabled   Value           Vendor
write cache                    yes      no
flush cache                    yes      yes
"

And with it set to 'Yes' in the BIOS:

"
test# camcontrol identify ada0 | grep -E "(Feature)|(cache)"
Feature                      Support  Enabled   Value           Vendor
write cache                    yes      yes
flush cache                    yes      yes
"


So in a very round-the-houses way, that's all it appears to change... Guess 
it's nice to have the option.

I'd also guess whilst enabling it for ZFS is good, having it enabled for 
UFS is slightly dangerous (and that by enabling it machine wide you may 
trash the UFS file systems on that machine if it suffers a catastrophic 
power outage).


-Karl




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