virtio multiqueue clarification needed

Waldo

Member
May 12, 2021
5
1
23
46
I want to enable virtio multiqueue for mu router VM.

I have VM with:
6 vCPU
2 virtio NIC

When I enable multiqueue:
1 - in virtio NIC configuration I configure Multique parameter. If I have 6 vCPU and 2 NICs then I should enter 3 per NIC? Or 6 in each NIC config?
2 - inside guest I run: ethtool -L eth0 combined 3, ethtool -L eth1 combined 3 or respectively ethtool -L eth0 combined 6, ethtool -L eth1 combined 6
 
Hi!

If I have 6 vCPU and 2 NICs then I should enter 3 per NIC? Or 6 in each NIC config?
In general, the guest's operating system will usually pin each queue to a vCPU core. Therefore, there's not really a performance benefit to use more queues in total than vCPUs as then a vCPU must handle multiple queues then.

Multiqueues are best experimented with by measuring the actual benefits in transfer speeds/throughput/etc. and weighing it against the increased CPU usage. So, there's not really a general rule of thumb as it depends on the specific usage/application.
 
I want to enable virtio multiqueue for mu router VM.

I have VM with:
6 vCPU
2 virtio NIC

When I enable multiqueue:
1 - in virtio NIC configuration I configure Multique parameter. If I have 6 vCPU and 2 NICs then I should enter 3 per NIC? Or 6 in each NIC config?
2 - inside guest I run: ethtool -L eth0 combined 3, ethtool -L eth1 combined 3 or respectively ethtool -L eth0 combined 6, ethtool -L eth1 combined 6
you don't need to do it manually in the guest (at least on linux), the virtio drivers are able to change value automatically.