多队列virtio-net
多队列 virtio-net
配置多队列 virtio-net
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
<driver name='vhost' queues='N'/>
</interface>实践
参考
Last updated
<interface type='network'>
<source network='default'/>
<model type='virtio'/>
<driver name='vhost' queues='N'/>
</interface>Last updated
# ethtool -L eth0 combined Mroot 17061 0.0 0.0 0 0 ? S 10:48 0:00 [vhost-17060-0]
root 17062 0.0 0.0 0 0 ? S 10:48 0:00 [vhost-17060-1]virsh dumpxml vm-1 > vm-1.xml<interface type='network'>
...
<model type='virtio'/>
<driver name='vhost' queues='4'/>
...
</interface>virsh create vm-1.xmlroot 61913 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-0]
root 61914 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-1]
root 61915 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-0]
root 61916 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-1]
root 61917 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-0]
root 61918 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-1]
root 61919 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-0]
root 61920 0.0 0.0 0 0 ? S 11:12 0:00 [vhost-61912-1]# ethtool -L eth0
no channel parameters changed, aborting
current values: tx 0 rx 0 other 0combined 1# ethtool -l eth0
Channel parameters for eth0:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 4
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 1# ethtool -L eth0 combined 2# ethtool -l eth0
Channel parameters for eth0:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 4
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 2# ethtool -L eth0 combined 4
# ethtool -l eth0
Channel parameters for eth0:
Pre-set maximums:
RX: 0
TX: 0
Other: 0
Combined: 4
Current hardware settings:
RX: 0
TX: 0
Other: 0
Combined: 4# cat /proc/interrupts
CPU0 CPU1
...
27: 1352 0 PCI-MSI-edge virtio0-input.0
28: 1 0 PCI-MSI-edge virtio0-output.0
29: 378 0 PCI-MSI-edge virtio0-input.1
30: 1 0 PCI-MSI-edge virtio0-output.1
31: 151 0 PCI-MSI-edge virtio0-input.2
32: 1 0 PCI-MSI-edge virtio0-output.2
33: 268 0 PCI-MSI-edge virtio0-input.3
34: 0 0 PCI-MSI-edge virtio0-output.3