virtio-blk performance and MSI

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Michael suggested to me a while ago to try MSI with virtio-blk and I
played with this small patch:


Index: qemu-kvm/hw/virtio-blk.c
===================================================================
--- qemu-kvm.orig/hw/virtio-blk.c
+++ qemu-kvm/hw/virtio-blk.c
@@ -416,6 +416,7 @@ VirtIODevice *virtio_blk_init(DeviceStat
     s->vdev.get_config = virtio_blk_update_config;
     s->vdev.get_features = virtio_blk_get_features;
     s->vdev.reset = virtio_blk_reset;
+    s->vdev.nvectors = 2;
     s->bs = bs;
     s->rq = NULL;
     if (strlen(ps = (char *)drive_get_serial(bs)))
 
which gave about 5% speedups on 4k sized reads and writes, see the full
iozone output I attached.  Now getting the information about using
multiple MSI vectors from the command line to virtio-blk similar to how
virtio-net does seems extremly messy right now.  Waiting for Gerd's
additional qdev patches to make it easier as a qdev property.


	File size set to 131072 KB
	Record Size 4 KB
	O_DIRECT feature enabled
	Command line used: iozone -s 128m -r 4k -I -f /dev/sdb
	Output is in Kbytes/sec
	Time Resolution = 0.000001 seconds.
	Processor cache size set to 1024 Kbytes.
	Processor cache line size set to 32 bytes.
	File stride size set to 17 * record size.
                                                            random  random    bkwd   record   stride                                   
              KB  reclen   write rewrite    read    reread    read   write    read  rewrite     read   fwrite frewrite   fread  freread
native    131072       4   11428   11847    25110    25302   24415   10904   25051    12146    24859   978572  1224433 1974096  2086567
          131072       4   11812   11784    24941    25209   24325   10776   24814    12271    24907   959819  1208770 1977191  2103138
          131072       4   11834   11892    25270    25347   24427   10839   24571    12161    24558   958934  1213707 1959754  2100647
          131072       4   11688   11914    25102    25100   24514   10855   24787    12237    24738   987739  1218774 1985245  2085435
          131072       4   11768   11910    24986    25087   24342   10819   24687    12304    24711   974889  1221511 2027124  2102430
qemu      131072       4    8752    9137    14020    14181   13924    8491   14158     8215    13816   378448  1498838 2117166  2341281
          131072       4    9113    9097    14019    14187   14024    8536   14153     8243    14132  1194485  1506540 2053520  2333202
          131072       4    9082    9128    14001    14232   13971    8541   14113     8216    14103  1260659  1464543 2101490  2335442
          131072       4    9103    9163    14373    14149   13983    8523   14171     8242    14026  1278104  1503047 2127449  2334738
          131072       4    9084    9128    14103    14212   13980    8519   14064     8260    13810  1204696  1497434 2053129  2334362
qemu+msi  131072       4    9466    9726    15339    15225   14845    8884   15159     8631    14460   375140  1488522 2066115  2337399
          131072       4    9541    9590    15025    15059   15010    8852   15007     8677    14736  1142718  1491640 2111847  2332153
          131072       4    9492    9621    14831    15093   14792    8895   14849     8452    14976  1163760  1461825 2118741  2337985
          131072       4    9519    9615    14954    14950   14713    8915   15229     8547    14854  1212529  1490471 2091894  2343676
          131072       4    9527    9576    14872    14828   14741    8880   14891     8769    14502  1253559  1436703 2127827  2344256

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux