From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1McwuV-0001mS-Ap for qemu-devel@nongnu.org; Mon, 17 Aug 2009 03:45:43 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1McwuQ-0001im-RU for qemu-devel@nongnu.org; Mon, 17 Aug 2009 03:45:42 -0400 Received: from [199.232.76.173] (port=40324 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1McwuQ-0001ij-Mv for qemu-devel@nongnu.org; Mon, 17 Aug 2009 03:45:38 -0400 Received: from mx20.gnu.org ([199.232.41.8]:42318) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1McwuQ-0007jI-6i for qemu-devel@nongnu.org; Mon, 17 Aug 2009 03:45:38 -0400 Received: from mx2.redhat.com ([66.187.237.31]) by mx20.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1McwuP-0002Kx-BU for qemu-devel@nongnu.org; Mon, 17 Aug 2009 03:45:37 -0400 Received: from int-mx2.corp.redhat.com (int-mx2.corp.redhat.com [172.16.27.26]) by mx2.redhat.com (8.13.8/8.13.8) with ESMTP id n7H7jZlO026141 for ; Mon, 17 Aug 2009 03:45:35 -0400 Message-ID: <4A890A9D.4070000@redhat.com> Date: Mon, 17 Aug 2009 10:45:33 +0300 From: Avi Kivity MIME-Version: 1.0 Subject: Re: [Qemu-devel] [PATCH] qcow2: Metadata preallocation References: <1250262015-996-1-git-send-email-kwolf@redhat.com> <4A87F44B.5080308@redhat.com> <4A8902AA.2050200@redhat.com> In-Reply-To: <4A8902AA.2050200@redhat.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Kevin Wolf Cc: qemu-devel@nongnu.org On 08/17/2009 10:11 AM, Kevin Wolf wrote: > Avi Kivity schrieb: > >> On 08/14/2009 06:00 PM, Kevin Wolf wrote: >> >>> This introduces a qemu-img create option for qcow2 which allows the metadata to >>> be preallocated, i.e. clusters are reserved in the refcount table and L1/L2 >>> tables, but no data is written to them. Metadata is quite small, so this >>> happens in almost no time. >>> >>> Especially with qcow2 on virtio this helps to gain a bit of performance during >>> the initial writes. However, as soon as create a snapshot, we're back to the >>> normal slow speed, obviously. So this isn't the real fix, but kind of a cheat >>> while we're still having trouble with qcow2 on virtio. >>> >>> Note that the option is disabled by default and needs to be specified >>> explicitly using qemu-img create -f qcow2 -o preallocation=metadata. >>> >>> >>> >> Can't say I'm thrilled with this. I'd prefer coalescing metadata >> updates on parallel writes. I don't object to this though. >> > Even with improved concurrent cluster allocation, you might profit from > metadata preallocation by having less fragmented qcow2 images which > avoids splitting up requests. Not sure if this is relevant in practice > though. > What I meant was that I prefer changes that improve performance throughout the lifetime of the image rather than the initial writes, especially as there's a space tradeoff. It is not a strong objection, just a mild preference. > I'm certainly hoping that raw-win32 is doing whatever needs to be done? > The mentioned FSCTL_SET_SPARSE seems to be there at least. > Ah, I looked at the open code and missed it. -- error compiling committee.c: too many arguments to function