On Mon, Jun 23, 2014 at 11:14:25AM +0800, lihuiba wrote: > >Did you prefill the image? Amplification could come from cluster allocation. > Yes! > I forgot to mention that I created the qcow2 image with > 'preallocation=metadata', and I have allocated > the data blocks with dd in VM. > > > Creating image in host: > qemu-img create -f qcow2 -preallocation=metadata test.qcow2 100G > > > Allocating the blocks in VM: > dd if=/dev/zero of=/dev/vdb bs=1M > where vdb is the target image.
If you used dd inside the guest to preallocate the entire image, then both benchmark read and write requests work similarly to raw image access (the qcow2 metadata is cached in RAM and metadata updates are necessary, so accesses are very similar to raw). Did you use the same file system on the host when comparing qcow2 to raw image files? Please post the full QEMU command-line and fio job files. Stefan
pgpxYz8EfnTEi.pgp
Description: PGP signature