Turn off RAID read and write caching with ZFS?

Bob Friesenhahn bfriesen at simple.dallas.tx.us
Thu May 22 13:35:02 UTC 2014


On Thu, 22 May 2014, Karl Denninger wrote:
>
> Write-caching is very evil in a ZFS world, because ZFS checksums each block. 
> If the filesystem gets back an "OK" for a block not actually on the disk ZFS 
> will presume the checksum is ok.  If that assumption proves to be false down 
> the road you're going to have a very bad day.

I don't agree with the above statement.  Non-volatile write caching is 
very beneficial for zfs since it allows transactions (particularly 
synchronous zil writes) to complete much quicker.  This is important 
for NFS servers and for databases.  What is important is that the 
cache either be non-volatile (e.g. battery-backed RAM) or absolutely 
observe zfs's cache flush requests.  Volatile caches which don't obey 
cache flush requests can result in a corrupted pool on power 
loss, system panic, or controller failure.

Some plug-in RAID cards have poorly performing firmware which causes 
problems.  Only testing or experience from other users can help 
identify such cards so that they can be avoided or set to their least 
harmful configuration.

Bob
-- 
Bob Friesenhahn
bfriesen at simple.dallas.tx.us, http://www.simplesystems.org/users/bfriesen/
GraphicsMagick Maintainer,    http://www.GraphicsMagick.org/


More information about the freebsd-fs mailing list