Received: from eggs.gnu.org ([2001:4830:134:3::10]:42536) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTAyN-0001Lv-79 for qemu-devel@nongnu.org; Thu, 27 Mar 2014 10:08:04 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WTAyI-0006wW-BT for qemu-devel@nongnu.org; Thu, 27 Mar 2014 10:07:59 -0400 Received: from mx1.redhat.com ([209.132.183.28]:34799) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WTAyI-0006wP-2B for qemu-devel@nongnu.org; Thu, 27 Mar 2014 10:07:54 -0400 From: Markus Armbruster References: <1395412589-30601-1-git-send-email-pl@kamp.de> <87fvm5720l.fsf@blackfin.pond.sub.org> <53342271.5070803@kamp.de> Date: Thu, 27 Mar 2014 15:07:45 +0100 In-Reply-To: <53342271.5070803@kamp.de> (Peter Lieven's message of "Thu, 27 Mar 2014 14:06:57 +0100") Message-ID: <87wqffka4u.fsf@blackfin.pond.sub.org> MIME-Version: 1.0 Content-Type: text/plain Subject: Re: [Qemu-devel] [RFC PATCHv2] block: optimize zero writes with bdrv_write_zeroes List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Peter Lieven Cc: kwolf@redhat.com, famz@redhat.com, qemu-devel@nongnu.org, mreitz@redhat.com, stefanha@redhat.com, pbonzini@redhat.com Peter Lieven writes: > On 26.03.2014 10:16, Markus Armbruster wrote: >> Peter Lieven writes: >> >>> this patch tries to optimize zero write requests >>> by automatically using bdrv_write_zeroes if it is >>> supported by the format. >>> >>> this should significantly speed up file system initialization and >>> should speed zero write test used to test backend storage performance. >>> >>> the difference can simply be tested by e.g. >>> >>> dd if=/dev/zero of=/dev/vdX bs=1M >> Got actual numbers? Preferably for some operation that matters to >> users. > > To give you a rough figure I have an iSCSI Storage for testing that > has an 1GBit connection. The above command gives about 110MB/s > with detect-zeroes=off and about 980MB/s with detect-zeroes=unmap. > > Additionally I ran a test with v1 of the patch: > > ---8<--- > > I created a 60GB qcow2 container and formatted it with ext4. To > immediately show the difference > I disabled lazy inode table and lazy journal init (writing zero takes > place immediately then). > > Timing without the patch: > time mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vda > real 1m5.649s > user 0m0.416s > sys 0m3.148s > > Timing with the patch: > time mkfs.ext4 -E lazy_itable_init=0,lazy_journal_init=0 /dev/vdX > real 0m1.228s > user 0m0.116s > sys 0m0.732s > > Container Size after Format without the patch: 1150615552 Byte (1097.3MB) > Container Size after Format with the patch: 24645632 Byte (23.5MB) > > --->8--- > > Without the patch means detect-zeroes=off (default) and with the patch > means detect-zeroes=unmap. Recommend to document your testing in the commit message.