From owner-freebsd-fs@FreeBSD.ORG Mon Jan 24 12:54:09 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 81C9A106564A for ; Mon, 24 Jan 2011 12:54:09 +0000 (UTC) (envelope-from pawel@dawidek.net) Received: from mail.garage.freebsd.pl (60.wheelsystems.com [83.12.187.60]) by mx1.freebsd.org (Postfix) with ESMTP id 2AB4B8FC0A for ; Mon, 24 Jan 2011 12:54:08 +0000 (UTC) Received: by mail.garage.freebsd.pl (Postfix, from userid 65534) id A549445CA6; Mon, 24 Jan 2011 13:54:06 +0100 (CET) Received: from localhost (pdawidek.whl [10.0.1.1]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by mail.garage.freebsd.pl (Postfix) with ESMTP id C142A45C9B; Mon, 24 Jan 2011 13:54:01 +0100 (CET) Date: Mon, 24 Jan 2011 13:53:51 +0100 From: Pawel Jakub Dawidek To: Bruce Cran Message-ID: <20110124125351.GL1700@garage.freebsd.pl> References: <1ABA88EDF84B6472579216FE@Octa64> <20110122111045.GA59117@icarus.home.lan> <20110122172714.00002274@unknown> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha1; protocol="application/pgp-signature"; boundary="bAr+fMtvBxbbbkvl" Content-Disposition: inline In-Reply-To: <20110122172714.00002274@unknown> User-Agent: Mutt/1.4.2.3i X-PGP-Key-URL: http://people.freebsd.org/~pjd/pjd.asc X-OS: FreeBSD 9.0-CURRENT amd64 X-Spam-Checker-Version: SpamAssassin 3.0.4 (2005-06-05) on mail.garage.freebsd.pl X-Spam-Level: X-Spam-Status: No, score=-5.9 required=4.5 tests=ALL_TRUSTED,BAYES_00 autolearn=ham version=3.0.4 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 12:54:09 -0000 --bAr+fMtvBxbbbkvl Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Sat, Jan 22, 2011 at 05:27:14PM +0000, Bruce Cran wrote: > On Sat, 22 Jan 2011 15:51:21 +0000 > Karl Pielorz wrote: >=20 > > I'll have a look at those - I'm more interested in finding a tool > > that will write data both with, and without the "don't cache this" > > flag(s) set - to see if the performance is the same (you would hope > > that regardless of the BIOS setting that writing entirely data that's > > marked not to be cached, the performance would 'sink' back down to a > > sedate 12Mbytes/sec) - if it doesn't, something is lying somewhere :) >=20 > sysutils/fio supports that: just add "fsync=3Dx" to the > configuration file and it'll send a request to the OS to flush the data > to disk every x blocks. My guess (based on option name) is that it will perform fsync(2) every x blocks, which has nothing to do with disk write cache. Most file systems (unfortunately UFS is one of them) simply ignores existance of disk write caches. In Mac OS X you can find F_FULLFSYNC flag to fcntl(2) which is suppose to ask underlying disk to flush its cache. fsync(2) don't do that for UFS, but it does that for ZFS. --=20 Pawel Jakub Dawidek http://www.wheelsystems.com pjd@FreeBSD.org http://www.FreeBSD.org FreeBSD committer Am I Evil? Yes, I Am! --bAr+fMtvBxbbbkvl Content-Type: application/pgp-signature Content-Disposition: inline -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.14 (FreeBSD) iEYEARECAAYFAk09dl4ACgkQForvXbEpPzSKrQCg+jOX9lX8ho3yf2F/L01+SbQi yTEAoLREzy5dzV3T2kMcxB1kroU59+Kg =vAsD -----END PGP SIGNATURE----- --bAr+fMtvBxbbbkvl--