From owner-freebsd-fs@FreeBSD.ORG Sun Jun 21 10:03:18 2009 Return-Path: Delivered-To: freebsd-fs@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 19DEA1065673 for ; Sun, 21 Jun 2009 10:03:18 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: from an-out-0708.google.com (an-out-0708.google.com [209.85.132.240]) by mx1.freebsd.org (Postfix) with ESMTP id C22628FC16 for ; Sun, 21 Jun 2009 10:03:17 +0000 (UTC) (envelope-from dan.naumov@gmail.com) Received: by an-out-0708.google.com with SMTP id c3so1155767ana.13 for ; Sun, 21 Jun 2009 03:03:17 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type :content-transfer-encoding; bh=eS5v+624J8AJ31P3TQEUOVUPdu9xYyX4MjFHpVV8HrQ=; b=twKxU/O6DWNfdyzWpKhA7Bo0Z2xXZDYCBoJoe6fW2HWCkY6/96cBd1a0iiWoMyFFoH DY8vt+LNx3Q+tFhHt1jkVu8ODCU460nRfV3Zlmz4hnUQFA0R8kLvtLg8vCrAyiZunEwl qIqYJQKhNJKcT3E7IIybYwTBKekJ/hJS8qxIo= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type:content-transfer-encoding; b=bxA5zCytrYqTkrjO1IxAmMYBrZ1a/OOmD+wWlJGdJRfr6attjo1KL2T4DZolLvce1b EVlQ27zZc5/yLks3iaWbLVqkAj7xFzjHnCF2Hhil+bcZJenw9TPZhtPwsQreIwUyKreJ XCCcdCC7Fy2M9lOu0nZ8AVSGdsee4e7QZJuSw= MIME-Version: 1.0 Received: by 10.100.107.8 with SMTP id f8mr6343603anc.197.1245578597027; Sun, 21 Jun 2009 03:03:17 -0700 (PDT) In-Reply-To: <20090621092736.GA92656@owl.midgard.homeip.net> References: <20090620231130.GA88907@owl.midgard.homeip.net> <3c1674c90906201808t1854dd46n82213fbd0c1c254c@mail.gmail.com> <20090621092736.GA92656@owl.midgard.homeip.net> Date: Sun, 21 Jun 2009 13:03:17 +0300 Message-ID: From: Dan Naumov To: Erik Trulsson Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org, Kip Macy Subject: Re: ufs2 / softupdates / ZFS / disk write cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 21 Jun 2009 10:03:18 -0000 On Sun, Jun 21, 2009 at 12:27 PM, Erik Trulsson wro= te: > On Sun, Jun 21, 2009 at 05:18:39AM +0300, Dan Naumov wrote: >> Uh oh.... After some digging around, I found the following quote: "ZFS >> is designed to work with storage devices that manage a disk-level >> cache. ZFS commonly asks the storage device to ensure that data is >> safely placed on stable storage by requesting a cache flush." at >> http://www.solarisinternals.com/wiki/index.php/ZFS_Evil_Tuning_Guide I >> guess this might be somewhat related to why in the "disk cache >> disabled" scenario, ZFS suffers bigger losses than UFS2. > > If that quote is correct (and I have no real reason to doubt it) then > it should probably be safe to enable the disk's write cache when used wit= h > ZFS. =A0(That would make sense since UFS/FFS was originally designed to w= ork > with an older generation of disks that did not do any significant amount > of write-caching (partly due to having very little cache on them), while > ZFS has been designed to be used on modern hardware, and to be reliable e= ven > on cheap consumer-grade disks.) Actually, now that I think of it, this could be pretty big. If using ZFS on a disk will cause the disk to flush the cache every 5 seconds, wouldn't that mean that the sections of the cache that hold data from the UFS partition get flushed to disk as well, mostly eleminating the entire "disk cache lying =3D softupdates inconsistent" problem altogether? The most important part of this is obviously, whether the "ZFS forces cache flushes every 5 seconds) thing works in all cases (like mine, where I use ZFS on a slice) and not only those where ZFS is given direct access to the disk. Anyone knowledgable in the ways of FreeBSD ZFS implementation care to chip in? :) Sincerely, Dan Naumov