Skip to contentSkip to conversation

qcow2 slowdown in kvm-78,79

DISCUSSION Henrik Holst 5 participants 10 messages Nov 18, 2008 – Nov 20, 2008 KVM

lore
Share & tools
lore
#0 lore raw

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

Replacing qemu with the one bundled in kvm-77 solves this regression.

I have tested all the cache= options to -drive without success. cache=writeback and cache=off was a little bit better than the default cache=writethrough but not with any useful improvement.

/Henrik Holst
https://Witsbits.com - Utility Computing

#1 lore raw
Quoted 3 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

so i'm not the only one facing this problem.

- Thomas

#2 lore raw
In reply to Henrik Holst
Quoted 3 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

dd command?

what's your -drive parameters look like, specifically, what if type? ide, scsi, virtio?

Signature · 4 lines
Ryan Harper
Software Engineer; Linux Technology Center
IBM Corp., Austin, Tx
[email protected]
#3 lore raw
Quoted 7 lines · Ryan Harper
Quoted 4 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

Quoted 5 lines

dd command?

what's your -drive parameters look like, specifically, what if type? ide, scsi, virtio?

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

qcow needs some love.

Regards,

Anthony Liguori

#4 lore raw
Quoted 8 lines · Anthony Liguori
Quoted 7 lines · Ryan Harper
Quoted 5 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

Quoted 8 lines
Quoted 6 lines

dd command?

what's your -drive parameters look like, specifically, what if type? ide, scsi, virtio?

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

this was it. cache=writeback and the throughput goes from 10mb/s to 80/mb/ s with if=scsi

thanks.

- Thomas

#5 lore raw
Quoted 10 lines · Thomas Mueller
Quoted 4 lines · Anthony Liguori

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

this was it. cache=writeback and the throughput goes from 10mb/s to 80/mb/ s with if=scsi

Yeah, we'll most likely switch back to cache=writeback for the default for qcow2 images. qcow2 needs some lovin'.

Regards,

Anthony Liguori

Quoted 9 lines

thanks.

- Thomas

--
To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html

#6 lore raw
In reply to Anthony Liguori
Quoted 6 lines · Anthony Liguori
Quoted 5 lines · Ryan Harper
Quoted 3 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

Quoted 7 lines
Quoted 4 lines

dd command?

what's your -drive parameters look like, specifically, what if type? ide, scsi, virtio?

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

Would this affect 'qemu-img commit'? It took over an hour to commit a fresh install of Vista on a qcow2 virtual disk. (The base image expanded from 3GB to 11GB, which is a lot of committing, though.)

#7 lore raw
Quoted 5 lines

Would this affect 'qemu-img commit'? It took over an hour to commit a fresh install of Vista on a qcow2 virtual disk. (The base image expanded from 3GB to 11GB, which is a lot of committing, though.)

Yes.

Regards,

Anthony Liguori

Quoted 4 lines
Signature · 3 lines
To unsubscribe from this list: send the line "unsubscribe kvm" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
#8 lore raw
In reply to Anthony Liguori

ons 2008-11-19 klockan 12:26 -0600 skrev Anthony Liguori:

Quoted 9 lines
Quoted 8 lines · Ryan Harper
Quoted 4 lines · Henrik Holst

The bundled qemu in kvm-78 and kvm-79 slows down disk i/o with qcow2 images by an order of 10. If one got 60MB/s before, one gets around 6MB/s with 78 and 79 (measured with dd)

dd command?

	dd if=/dev/zero of=/mnt/zero count=102400000 &

and then "kill -USR1 <pid>" to get the statistics

Quoted 3 lines
Quoted 3 lines

what's your -drive parameters look like, specifically, what if type? ide, scsi, virtio?

It is the same regardless of ide,scsi or virtio. Virtio starts quite high around 70MB/s but quickly goes down to 6MB/s (after roughly 10 seconds).

The command line (for virtio) is:

	qemu-system-x86_64 -M pc -m 771 -smp 1 -vnc :0,tls,x509verify=/opt/kvm/cert \
		-k en-us -monitor pty -serial none -usbdevice tablet \
		-drive file=/mnt/d0/drive.root,if=virtio,media=disk,boot=on \
		-drive file=/mnt/d0/drive2,if=virtio,media=disk,boot=off \
		-net nic,macaddr=DE:AF:00:00:10:43,model=virtio \
		-net tap,script=/opt/kvm/share/qemu-ifup \
		-uuid 6b7d5438-1309-4cf0-ae08-57234d61d473

I have tested with all kinds of -m settings as well (up to 8GiB) without any change.

Quoted 4 lines
Quoted 1 line

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

cache=writeback is only slightly faster, like going from 6MB/s to 7MB/s.

The only thing that works is using qemu userland from kvm-77. I have not tested this with anything other than qcow2 so I'm guessing that it is related to qcow2 due to the cache change in kvm-78 and your other comments about qcow2 and these changes when issues about degraded qcow2 performance has come up.

/Henrik Holst
https://witsbits.com

#9 lore raw
Quoted 5 lines
Quoted 3 lines

This is probably the change to cache=writethrough. I bet if you set cache=writeback then you'll see this go away.

cache=writeback is only slightly faster, like going from 6MB/s to 7MB/s.

ignore that remark, I retested with cache=writeback and everything is OK again. I must have misspelled somehow and qemu didn't quit on me or there was something else going on at the time of my tests.

Thanks!

/Henrik Holst
https://witsbits.com