From owner-freebsd-fs@FreeBSD.ORG Sun Jul 27 18:25:48 2008 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 8BFFB1065675; Sun, 27 Jul 2008 18:25:48 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from smtp.infidyne.com (ds9.infidyne.com [88.80.6.206]) by mx1.freebsd.org (Postfix) with ESMTP id 4FF9D8FC08; Sun, 27 Jul 2008 18:25:48 +0000 (UTC) (envelope-from peter.schuller@infidyne.com) Received: from c-a916e555.03-51-73746f3.cust.bredbandsbolaget.se (c-a916e555.03-51-73746f3.cust.bredbandsbolaget.se [85.229.22.169]) by smtp.infidyne.com (Postfix) with ESMTPSA id CDC267030A; Sun, 27 Jul 2008 20:25:46 +0200 (CEST) From: Peter Schuller To: Pawel Jakub Dawidek Date: Sun, 27 Jul 2008 20:26:46 +0200 User-Agent: KMail/1.9.7 References: <200807262005.54235.peter.schuller@infidyne.com> <20080726205118.GB1345@garage.freebsd.pl> In-Reply-To: <20080726205118.GB1345@garage.freebsd.pl> MIME-Version: 1.0 Content-Type: multipart/signed; boundary="nextPart101433479.frefnM8Eff"; protocol="application/pgp-signature"; micalg=pgp-sha1 Content-Transfer-Encoding: 7bit Message-Id: <200807272026.54907.peter.schuller@infidyne.com> Cc: freebsd-fs@freebsd.org Subject: Re: Asynchronous writing to zvols (ZFS) 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, 27 Jul 2008 18:25:48 -0000 --nextPart101433479.frefnM8Eff Content-Type: text/plain; charset="iso-8859-15" Content-Transfer-Encoding: quoted-printable Content-Disposition: inline Hello, > The problem is that we don't between async and sync I/O request on GEOM > level, that's why I decided to commit a ZIL log after each write, which > wasn't very smart it seems. This is handled differently in version I've > in perforce. Could you try the below patch and see how it performs now? > > http://people.freebsd.org/~pjd/patches/zvol.c.patch The above (though the files has moved, for anyone else reading wanting to=20 apply) does eliminate the synchronicity problem. I am now seeing 5-15=20 MB/second write speeds to the zvol, with 100% constituent disk utilization. I am not sure why I don't see faster writes; I get more like 40-60 when=20 writing to a file in a ZFS file system on the same pool. But regardless, th= e=20 synchronisity issue is gone. Does your comment above regarding distinguishing bewteen sync and asynch ap= ply=20 to the section of code affected by the above patch, or did you mean there i= s=20 some other place above the zvol handling where there is lack of distinction? That is, is the end-effect of the above change that we *never* do synchrono= us=20 writes (because the fact that a write is supposed to be synchronous is=20 somehow lost before it reaches that point)? I understand a zil_commit is only required on BIO_FLUSH requests, which is= =20 what the patch fixes. But I get the impression from your phrasing above tha= t=20 the reason that a zil_commit was done on every I/O from the get go was in a= n=20 effort to honor actual synchronous writes by conservatively *always* doing= =20 synchronous writes, because the synchronicity of synchronous writes would n= ot=20 be propagated down to the zvol class. I wouldn't want to sacrifice=20 correctness just to get the speed ;) =2D-=20 / Peter Schuller PGP userID: 0xE9758B7D or 'Peter Schuller ' Key retrieval: Send an E-Mail to getpgpkey@scode.org E-Mail: peter.schuller@infidyne.com Web: http://www.scode.org --nextPart101433479.frefnM8Eff Content-Type: application/pgp-signature; name=signature.asc Content-Description: This is a digitally signed message part. -----BEGIN PGP SIGNATURE----- Version: GnuPG v2.0.9 (FreeBSD) iEYEABECAAYFAkiMve4ACgkQDNor2+l1i323JQCeJGz+HHjH3+7otXK8uQTgiCHx N/MAn2pTreSDYOpn4KrzwXM2CJIe9OLr =PNCr -----END PGP SIGNATURE----- --nextPart101433479.frefnM8Eff--