Peter Lieven <p...@kamp.de> writes: > On 26.03.2014 10:16, Markus Armbruster wrote: >> Peter Lieven <p...@kamp.de> 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.