From owner-freebsd-fs@FreeBSD.ORG Mon Jan 24 14:22:49 2011 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 5DEC6106566B for ; Mon, 24 Jan 2011 14:22:49 +0000 (UTC) (envelope-from olivier@gid0.org) Received: from mail-iy0-f182.google.com (mail-iy0-f182.google.com [209.85.210.182]) by mx1.freebsd.org (Postfix) with ESMTP id 3216F8FC12 for ; Mon, 24 Jan 2011 14:22:48 +0000 (UTC) Received: by iyb26 with SMTP id 26so4157994iyb.13 for ; Mon, 24 Jan 2011 06:22:48 -0800 (PST) MIME-Version: 1.0 Received: by 10.231.34.65 with SMTP id k1mr4826792ibd.9.1295877351493; Mon, 24 Jan 2011 05:55:51 -0800 (PST) Received: by 10.231.59.142 with HTTP; Mon, 24 Jan 2011 05:55:51 -0800 (PST) In-Reply-To: <20110122111045.GA59117@icarus.home.lan> References: <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan> Date: Mon, 24 Jan 2011 14:55:51 +0100 Message-ID: From: Olivier Smedts To: Jeremy Chadwick Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Cc: freebsd-fs@freebsd.org Subject: Re: Write cache, is write cache, is 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: Mon, 24 Jan 2011 14:22:49 -0000 Hello, 2011/1/22 Jeremy Chadwick : > On Sat, Jan 22, 2011 at 10:39:13AM +0000, Karl Pielorz wrote: >> I've a small HP server I've been using recently (an NL36). I've got >> ZFS setup on it, and it runs quite nicely. >> >> I was using the server for zeroing some drives the other day - and >> noticed that a: >> >> =A0dd if=3D/dev/zero of=3D/dev/ada0 bs=3D2m >> >> Gives around 12Mbyte/sec throughput when that's all that's running >> on the machine. >> >> Looking in the BIOS is a "Enabled drive write cache" option - which >> was set to 'No'. Changing it to 'Yes' - I now get around >> 90-120Mbyte/sec doing the same thing. >> >> Knowing all the issues with IDE drives and write caches - is there >> any way of telling if this would be safe to enable with ZFS? (i.e. >> if the option is likely to be making the drive completely ignore >> flush requests?) - or if it's still honouring the various 'write >> through' options if set on data to be written? >> >> I'm presuming DD won't by default be writing the data with the >> 'flush' bit set - as it probably doesn't know about it. >> >> Is there anyway of testing this? (say using some tool to write the >> data using either lots of 'cache flush' or 'write through' stuff) - >> and seeing if the performance drops back to nearer the 12Mbyte/sec? >> >> I've not enabled the option with the ZFS drives in the machine - I >> suppose I could test it. >> >> Write performance on the unit isn't that bad [it's not stunning] - >> though with 4 drives in a mirrored set - it probably helps hide some >> of the impact this option might have. > > I'm stating the below with the assumption that you have SATA disks with > some form of AHCI-based controller (possibly Intel ICHxx or ESBx > on-board), and *not* a hardware RAID controller with cache/RAM of its > own: > > Keep write caching *enabled* in the system BIOS. =A0ZFS will take care of > any underlying "issues" in the case the system abruptly loses power > (hard disk cache contents lost), since you're using ZFS mirroring. =A0The > same would apply if you were using raidz{1,2}, but not if you were using > ZFS on a single device (no mirroring/raidz). =A0In that scenario, expect > data loss; but the same could be said of any non-journalling filesystem. Could you explain this behavior ? I don't see why ZFS would not ask a single disk to flush its caches like in a mirror/raidz. It's necessary for the ZIL, and to avoid FS corruption. > I have no idea why your BIOS setting for this option was disabled. =A0I d= o > not know if it's the factory default either; you would have to talk to > HP about that, or spend the time figuring out who was in the system BIOS > last and how/if/why they messed around (the number of possibilities for > why the option is disabled are endless). > > You can use bonnie++ (ports/benchmarks/bonnie++) if you wish to do > throughput and/or benchmark testing of sorts. > > -- > | Jeremy Chadwick =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 =A0 =A0 jdc@parodius.com | > | Parodius Networking =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 http://= www.parodius.com/ | > | UNIX Systems Administrator =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0Mountain = View, CA, USA | > | Making life hard for others since 1977. =A0 =A0 =A0 =A0 =A0 =A0 =A0 PGP= 4BD6C0CB | > > _______________________________________________ > freebsd-fs@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-fs > To unsubscribe, send any mail to "freebsd-fs-unsubscribe@freebsd.org" > --=20 Olivier Smedts=A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 = =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0=A0 _ =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0 =A0= =A0 ASCII ribbon campaign ( ) e-mail: olivier@gid0.org=A0 =A0 =A0 =A0 - against HTML email & vCards=A0 X www: http://www.gid0.org=A0 =A0 - against proprietary attachments / \ =A0 "Il y a seulement 10 sortes de gens dans le monde : =A0 ceux qui comprennent le binaire, =A0 et ceux qui ne le comprennent pas."