Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-24 Thread Kevin Wolf
Am 24.06.2014 um 09:25 hat lihuiba geschrieben: Can you confirm that making L2_CACHE_SIZE much bigger solves the problem? Yes, it is confirmed. When I run fio randread with a 7GB or 8GB size, result is close to that of raw image. But when the size is increased to 9GB, the result drops

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-23 Thread lihuiba
I think I have found the reason: There's a cache in qemu that accelerates the transform of virtual LBA to cluster offset of qcow2 image. The cache has a fixed size of 16x8192=128k in my configuration, which corresponds to a 8GB (128K*64KB) mapping size. So when the working set of fio exceeds

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-23 Thread Stefan Hajnoczi
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

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-23 Thread Stefan Hajnoczi
On Mon, Jun 23, 2014 at 02:20:25PM +0800, lihuiba wrote: I think I have found the reason: There's a cache in qemu that accelerates the transform of virtual LBA to cluster offset of qcow2 image. The cache has a fixed size of 16x8192=128k in my configuration, which corresponds to a 8GB

[Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-22 Thread lihuiba
Hi, all I'm using a qcow2 image stored on a SSD RAID1 (2 x intel S3500), and I'm benchmarking the system using fio. Although the throughput in VM (with KVM and virtio enabled) is acceptable (67% of thoughtput in host), the IOPS performance seems is extremely low only 2% of IOPS in host.

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-22 Thread Fam Zheng
On Mon, 06/23 10:06, lihuiba wrote: Hi, all I'm using a qcow2 image stored on a SSD RAID1 (2 x intel S3500), and I'm benchmarking the system using fio. Although the throughput in VM (with KVM and virtio enabled) is acceptable (67% of thoughtput in host), the IOPS performance seems is

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-22 Thread lihuiba
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

Re: [Qemu-devel] extremely low IOPS performance of QCOW2 image format on an SSD RAID1

2014-06-22 Thread Fam Zheng
Cc'ing more qcow2 experts. On Mon, 06/23 11:14, 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.