[VirtIO NICs] Help understanding when to use multiqueue in VMs?

Sep 1, 2022
561
215
68
42
Hello,

I have a couple of questions about multiqueue, as it's not something I've had to think about before getting into advanced VM configuration. (It's also not really something any of the "Welcome to Proxmox 101" videos and tutorials and such really talk about.

I understand that by default, (1) mutliqueue is effectively disabled at the VM configuration level, and therefore (2) the VM uses a single thread for VirtIO NIC operations per VirtIO NIC, which theoretically can cause performance issues if that single thread can't handle the network traffic.

When I set up 10 Gbps-capable VMs, I include a dedicated 10 Gbps NIC with MTU 9000 on a high-speed traffic VLAN, and I'm definitely able to get line speed with very simple iPerf3 testing. So, I've never seen an issue from not using mutliqueue, but I'm also confident that I've never really pushed anything hard enough for the bottleneck caused by everything being on a single thread to appear. (I'm in a home office and use PVE for a mix of hobbyist and work production stuff, so I'm not exactly a Lord of the Bandwidth. Yet.)

I realize there's no one right answer to the question of when to enable mulitqueue, so I was hoping some of y'all might be able to share when you've found it useful (or not useful) so I can start to get my head around it. I vaguely understand that I should be on the lookout for vCPU pegging or inability to hit line speed as an indicator that I need to enable it, but any suggestions on when it's actually worth the time and effort to change the default behavior based on actual use cases would be great.

(I almost just started enabling it on every VM where I use 10 Gbps data connections, but then I realized that's almost certainly not the right answer becuase it's (1) off by default and (2) none of the otherwise excellent documentation and tutorials and such I've studied ever talk about it as something you must have.)
 
Hello, @SInisterPisces
You have probably studied this already, but just in case I'm giving the link to the fragment on the subject:

https://pve.proxmox.com/pve-docs/chapter-qm.html#qm_network_device
- section "Multiqueue".

It gives technical details and the recommendation:

"We recommend to set this option only when the VM has to process a great number of incoming connections, such as when the VM is running as a router, reverse proxy or a busy HTTP server doing long polling."

Unfortunately, I don't have any actual experience on pros and cons of this setting.
 
  • Like
Reactions: SInisterPisces
Thanks for including that, @Onslow . I should have excerpted that in my OP.

I suppose a better way to ask is what people find to constitute sufficiently high incoming traffic. I believe it's helpful with Wireguard and other VPNs, for instance, but that's all I can think of beyond what the docs say.

Maybe a really big Minecraft server? :P
 
Terminalserver, ERP systems, webservers, proxy systems, firewalls, etc. There are several scenarios where VMs profit from activated MQ.
 
It's mainly when you have a lot of (small) packets per second incoming. (If I remember, qemu is around 2millions pps with 1 core)

try an iperf3 with 64bytes packets (to simulate a syn flood for example)