Hi, Paolo, Amit,
any ideas?
Thanks,
Zhang Haoyu
On 2014-9-4 15:56, Zhang Haoyu wrote:
> If virtio-blk and virtio-serial share an IRQ, the guest operating system
> has to check each virtqueue for activity. Maybe there is some
> inefficiency doing that.
> AFAIK virtio-serial registers 64 virtqueues (on 31 ports + console) even
> if everything is unused.
That could be the case if MSI is disabled.
>>> Do the windows virtio drivers enable MSIs, in their inf file?
>> It depends on the version of the drivers, but it is a reasonable guess
>> at what differs between Linux and Windows. Haoyu, can you give us the
>> output of lspci from a Linux guest?
>>
> I made a test with fio on rhel-6.5 guest, the same degradation happened too,
> this degradation can be reproduced on rhel6.5 guest 100%.
> virtio_console module installed:
> 64K-write-sequence: 285 MBPS, 4380 IOPS
> virtio_console module uninstalled:
> 64K-write-sequence: 370 MBPS, 5670 IOPS
>
> And, virio-blk's interrupt mode always is MSI, no matter if virtio_console
> module is installed or uninstalled.
> 25:2245933 PCI-MSI-edge virtio1-requests
>
> fio command:
> fio -filename /dev/vda -direct=1 -iodepth=1 -thread -rw=write -ioengine=psync
> -bs=64k -size=30G -numjobs=1 -name=mytest
>
> QEMU comamnd:
> /usr/bin/kvm -id 5497356709352 -chardev
> socket,id=qmp,path=/var/run/qemu-server/5497356709352.qmp,server,nowait -mon
> chardev=qmp,mode=control -vnc :0,websocket,to=200 -enable-kvm -pidfile
> /var/run/qemu-server/5497356709352.pid -daemonize -name io-test-rhel-6.5 -smp
> sockets=1,cores=1 -cpu core2duo -nodefaults -vga cirrus -no-hpet -k en-us
> -boot menu=on,splash-time=8000 -m 4096 -usb -drive
> file=/sf/data/local/zhanghaoyu/rhel-server-6.5-x86_64-dvd.iso,if=none,id=drive-ide0,media=cdrom,aio=native,forecast=disable
> -device ide-cd,bus=ide.0,unit=0,drive=drive-ide0,id=ide0,bootindex=200
> -drive
> file=/sf/data/local/images/host-1051721dff13/io-test-rhel-6.5.vm/vm-disk-1.qcow2,if=none,id=drive-virtio1,cache=none,aio=native
> -device virtio-blk-pci,drive=drive-virtio1,id=virtio1,bus=pci.0,addr=0xb
> -drive
> file=/sf/data/local/images/host-1051721dff13/io-test-rhel-6.5.vm/vm-disk-2.qcow2,if=none,id=drive-virtio2,cache=none,aio=native
> -device virtio-blk-pci,drive=drive-virtio2,id=virtio2,bus=pci
> .0,addr=0xc,bootindex=101 -netdev
> type=tap,id=net0,ifname=164922379979200,script=/sf/etc/kvm/vtp-bridge,vhost=on,vhostforce=on
> -device
> virtio-net-pci,mac=FE:FC:FE:C6:47:F6,netdev=net0,bus=pci.0,addr=0x12,id=net0,bootindex=300
> -rtc driftfix=slew,clock=rt -global kvm-pit.lost_tick_policy=discard -global
> PIIX4_PM.disable_s3=1 -global PIIX4_PM.disable_s4=1 -chardev
> socket,path=/run/virtser/1649223799792.sock,server,nowait,id=channelser
> -device virtio-serial,vectors=4 -device
> virtserialport,chardev=channelser,name=channelser.virtserial0.0
>
> [environment]
> Host:linux-3.10(RHEL7-rc1)
> QEMU: qemu-2.0.1
> Guest: RHEL6.5
>
> # lspci -tv
> -[:00]-+-00.0 Intel Corporation 440FX - 82441FX PMC [Natoma]
>+-01.0 Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
>+-01.1 Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
>+-01.2 Intel Corporation 82371SB PIIX3 USB [Natoma/Triton II]
>+-01.3 Intel Corporation 82371AB/EB/MB PIIX4 ACPI
>+-02.0 Cirrus Logic GD 5446
>+-03.0 Red Hat, Inc Virtio console
>+-0b.0 Red Hat, Inc Virtio block device
>+-0c.0 Red Hat, Inc Virtio block device
>\-12.0 Red Hat, Inc Virtio network device
>
> # lspci -vvv
> 00:00.0 Host bridge: Intel Corporation 440FX - 82441FX PMC [Natoma] (rev 02)
> Subsystem: Red Hat, Inc Qemu virtual machine
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort-
> SERR-
> 00:01.0 ISA bridge: Intel Corporation 82371SB PIIX3 ISA [Natoma/Triton II]
> Subsystem: Red Hat, Inc Qemu virtual machine
> Control: I/O+ Mem+ BusMaster- SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap- 66MHz- UDF- FastB2B- ParErr- DEVSEL=medium >TAbort-
> SERR-
> 00:01.1 IDE interface: Intel Corporation 82371SB PIIX3 IDE [Natoma/Triton II]
> (prog-if 80 [Master])
> Subsystem: Red Hat, Inc Qemu virtual machine
> Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr-
> Stepping- SERR+ FastB2B- DisINTx-
> Status: Cap- 66MHz- UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort-
> SERR- Latency: 0
> Region 0: [virtual] Memory at 01f0 (32-bit, non-prefetchable)
> [size=8]
> Region 1: [virtual] Memory at 03f0 (type 3, non-prefetchable)
> Region 2: [virtual] Memory at 0170 (32-bit, non-prefetchable)
> [size=8]
> Region 3: [virtual] Memory at 0370 (type 3, non