From owner-freebsd-fs@FreeBSD.ORG Wed Dec 19 15:10:44 2012 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [69.147.83.52]) by hub.freebsd.org (Postfix) with ESMTP id 7C199802 for ; Wed, 19 Dec 2012 15:10:44 +0000 (UTC) (envelope-from matt.churchyard@userve.net) Received: from av.userve.net (antivirus.userve.net [217.196.1.11]) by mx1.freebsd.org (Postfix) with ESMTP id F03D28FC14 for ; Wed, 19 Dec 2012 15:10:43 +0000 (UTC) X-ASG-Debug-ID: 1355928762-4588c36a0001-3nHGF7 Received: from smtp-outbound.userve.net ([192.168.101.15]) by av.userve.net with ESMTP id P8eueQ7f1kFaZlvE for ; Wed, 19 Dec 2012 14:52:42 +0000 (GMT) X-Barracuda-Envelope-From: matt.churchyard@userve.net Received: from usd-group.com (titan.userve.net [217.196.1.2]) by smtp-outbound.userve.net (8.14.5/8.14.5) with ESMTP id qBJEqfTa095782 for ; Wed, 19 Dec 2012 14:52:41 GMT (envelope-from matt.churchyard@userve.net) Content-class: urn:content-classes:message X-Barracuda-Apparent-Source-IP: 217.196.1.2 MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: quoted-printable Subject: ZFS: cache_flush_disable Date: Wed, 19 Dec 2012 14:52:40 -0000 X-ASG-Orig-Subj: ZFS: cache_flush_disable X-MimeOLE: Produced By Microsoft Exchange V6.5 Message-ID: <36B5948F85049844985F24A1CE55B2CBEB980A@USDSERVER.usd.local> X-MS-Has-Attach: X-MS-TNEF-Correlator: Thread-Topic: ZFS: cache_flush_disable thread-index: Ac3d9AHohhiRQi1WSeOWYVHPRSdIXA== From: "Matt Churchyard" To: X-Barracuda-Connect: UNKNOWN[192.168.101.15] X-Barracuda-Start-Time: 1355928762 X-Barracuda-URL: http://antivirus.userve.net:80/cgi-mod/mark.cgi X-Virus-Scanned: by bsmtpd at userve.net X-Barracuda-Spam-Score: 0.00 X-Barracuda-Spam-Status: No, SCORE=0.00 using global scores of TAG_LEVEL=1000.0 QUARANTINE_LEVEL=1000.0 KILL_LEVEL=9.0 tests= X-Barracuda-Spam-Report: Code version 3.2, rules version 3.2.2.117464 Rule breakdown below pts rule name description ---- ---------------------- -------------------------------------------------- X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 19 Dec 2012 15:10:44 -0000 Can anyone give some knowledgeable info on the vfs.zfs.cache_flush_disable variable?=20 There's a lot of talk going on in the FreeBSD forums about how to get the best performance but no-one really knows exactly what these settings do (searching the net doesn't really find anyone who knows either). There's a lot of mis-information going around as well and so I'd like to start trying to get some concrete information if possible. I'd like to know 1) What this setting actually does 2) If it's safe assuming you have battery backed ZIL (e.g. supercap SSD) I am under the impression it controls whether ZFS asks disks to flush their caches or not. However, there's an entire function in zil.c (zil_add_block) that is skipped when this flag is set. I'm not sure what this function does but it seems to do more than just flush caches? Regarding question 2, if this variable affects flushing of pool disks, not just the ZIL, I can imagine a scenario where ZFS flushes a transaction to the pool, but a power loss occurs while some of that data is still sat in the disk cache. Usually ZFS would flush the cache and only assume the write was complete at that point. Assuming it affects all disks, is it possible to turn off write cache per disk? I have seen hw.ata.wc but I'm not sure this still applies and if it does it'll affect the ZIL which you'd want to leave enabled if it was protected. -- Matt