Re: [PATCH 0/9] kvm tools, qcow: Improve QCOW performance

Pekka Enberg
2011-07-11T10:44:56Z

On Mon, Jul 11, 2011 at 1:36 PM, Ingo Molnar <mingo@elte.hu> wrote:
>
> * Pekka Enberg <penberg@kernel.org> wrote:
>
>> > As Ingo already said, the cache mode is probably the major
>> > difference. From what I can see in your code, cache=writeback
>> > would be the equivalent for what tools/kvm is doing, however
>> > cache=none (i.e. O_DIRECT) is what people usually do with qemu.
>>
>> Yup, I posted 'cache=writeback' results too which are much closer
>> to tools/kvm numbers.
>
> tools/kvm/ seems to be about 20% faster on average:
>
>   511229952 bytes (511 MB) copied, 7.68312 s, 66.5 MB/s
>   511229952 bytes (511 MB) copied, 7.54065 s, 67.8 MB/s
>   511229952 bytes (511 MB) copied, 9.34749 s, 54.7 MB/s
>   511229952 bytes (511 MB) copied, 9.2421 s, 55.3 MB/s
>   511229952 bytes (511 MB) copied, 9.9364 s, 51.5 MB/s
>   511229952 bytes (511 MB) copied, 10.0337 s, 51.0 MB/s
>   511229952 bytes (511 MB) copied, 9.39502 s, 54.4 MB/s
>
> versus the qemu numbers:
>
>  511229952 bytes (511 MB) copied, 10.0879 s, 50.7 MB/s
>  511229952 bytes (511 MB) copied, 4.92686 s, 104 MB/s
>  511229952 bytes (511 MB) copied, 13.1955 s, 38.7 MB/s
>  511229952 bytes (511 MB) copied, 10.7322 s, 47.6 MB/s
>  511229952 bytes (511 MB) copied, 9.46115 s, 54.0 MB/s
>  511229952 bytes (511 MB) copied, 14.9963 s, 34.1 MB/s
>  511229952 bytes (511 MB) copied, 11.1701 s, 45.8 MB/s
>
> but indeed there's (much) more variability in the Qemu numbers,
> suggesting some cache artifact.
>
> Are all of these measurements done via /dev/shm, to stabilize the
> numbers and to remove disk IO delay artifacts?

No, I wanted to include disk IO delay artifacts because I was
comparing tools/kvm to itself using seekwatcher to see what's really
happening. And as Kevin pointed out, we're still missing refcount
tables from tools/kvm so it's not a proper comparison anyway. It does
show that tools/kvm QCOW performance improved significantly, though.

Pekka