From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MViUQ-0004FW-Bq for qemu-devel@nongnu.org; Tue, 28 Jul 2009 04:56:54 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MViUO-0004DU-Tq for qemu-devel@nongnu.org; Tue, 28 Jul 2009 04:56:53 -0400 Received: from [199.232.76.173] (port=38338 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MViUO-0004DN-PK for qemu-devel@nongnu.org; Tue, 28 Jul 2009 04:56:52 -0400 Received: from mx1.redhat.com ([66.187.233.31]:37911) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MViUO-0007YQ-7a for qemu-devel@nongnu.org; Tue, 28 Jul 2009 04:56:52 -0400 Date: Tue, 28 Jul 2009 09:56:42 +0100 From: "Daniel P. Berrange" Subject: Re: [Qemu-devel] [PATCH] Add new block driver for the VDI format (use aio) Message-ID: <20090728085642.GD26495@redhat.com> References: <4A6888AC.3050509@mail.berlios.de> <1248380985-7362-1-git-send-email-weil@mail.berlios.de> <4A697C7E.80400@redhat.com> <4A69DF48.7000109@mail.berlios.de> <4A6D5EA2.2080706@redhat.com> <20090727092319.GA7967@shareable.org> <20090728063739.GA2603@amit-x200.redhat.com> <20090728083452.GA21321@shareable.org> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20090728083452.GA21321@shareable.org> Reply-To: "Daniel P. Berrange" List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Jamie Lokier Cc: Amit Shah , Kevin Wolf , QEMU Developers , Christoph Hellwig On Tue, Jul 28, 2009 at 09:34:52AM +0100, Jamie Lokier wrote: > Amit Shah wrote: > > On (Mon) Jul 27 2009 [10:23:19], Jamie Lokier wrote: > > > Kevin Wolf wrote: > > > > Though I guess that for static images typically not only metadata is > > > > preallocated, but zeros are written for the whole disk content? Maybe we > > > > could implement a three-way flag like preallocate=[no,metadata,data] and > > > > let qemu-img handle the data part (writing zeros is the same for all > > > > formats and would even work with raw). > > > > > > Note that you can also preallocate space with posix_fallocate(), which > > > fills the file with zeros but (sometimes) doesn't take as long as > > > writing zeros. > > > > It won't take as long as writing zeroes if the filesystem underneath has > > support for fallocate(). ext4, btrfs, xfs have support for fallocate(). > > > > > Apparently it is almost essential when writing large files in small > > > pieces on Windows, and on Linux it is supported by the ext4 > > > filesystem, but I haven't checked either claim. > > > > I did some comparisons: > > > > http://log.amitshah.net/2009/03/comparison-of-file-systems-and-speeding.html > > > > http://log.amitshah.net/2009/04/re-comparing-file-systems.html > > There was some discussion of it on the rsync list, which is where I > learned it is important for NTFS performance on Windows. > > By the way, why is fallocate() support being added to libvirt to > improve disk image creation, instead of to qemu-img? libvirt has to work with more than just QEMU. Thus it has a built in support for creating raw files, and this is where we added fallocate support. It also has ability to call out to hypervisor specific tools for creating non-raw formats. We support qemu-img, and qcow-create (the latter from Xen) Regards, Daniel -- |: Red Hat, Engineering, London -o- http://people.redhat.com/berrange/ :| |: http://libvirt.org -o- http://virt-manager.org -o- http://ovirt.org :| |: http://autobuild.org -o- http://search.cpan.org/~danberr/ :| |: GnuPG: 7D3B9505 -o- F3C9 553F A1DA 4AC2 5648 23C1 B3DF F742 7D3B 9505 :|