On 28/04/09 at 14:55 +0300, Avi Kivity wrote: > Lucas Nussbaum wrote: >> On 28/04/09 at 12:56 +0200, Lucas Nussbaum wrote: >> >>> I then upgraded to kvm-85 (both the host kernel modules and the >>> userspace), and re-ran the tests. Performance is better (about 85 MB/s), >>> but still very far from the non-virtio case. >>> >> >> I forgot to mention that the strangest result I got was the total amount >> of write blocks queued (as measured by blktrace). I was writing a 1 GB >> file to disk, which resulted in: >> >> - 1 GB of write blocks queued without virtio >> - ~1.7 GB of write blocks queued with virtio on kvm 84 >> - ~1.4 GB of write blocks queued with virtio on kvm 85 >> >> I don't understand with kvm with virtio writes "more blocks than >> necessary", but that could explain the performance difference. > > Are these numbers repeatable? The fact that more data than necessary is written to disk with virtio is reproducible. The exact amount of additional data varies between runs. > Try increasing the virtio queue depth. See the call to > virtio_add_queue() in qemu/hw/virtio-blk.c. It doesn't seem to change the performance I get (but since the performance itself is varying a lot, it's difficult to tell). Some example data points, writing a 500 MiB file: 1st run, with virtio queue length = 512 - total size of write req queued: 874568 KiB - 55 MB/s 2nd run, with virtio queue length = 128 - total size of write req queued: 694328 KiB - 86 MB/s -- | Lucas Nussbaum | lucas@xxxxxxxxxxxxxxxxxx http://www.lucas-nussbaum.net/ | | jabber: lucas@xxxxxxxxxxx GPG: 1024D/023B3F4F | -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html