Set VirtIO Network Queue Size

altyphet

New Member
Jun 9, 2020
1
0
1
44
I'm running an OPNSense VM (tried with pfSense with same results) and I've been trying to troubleshoot a discrepancy in speed tests with this VM, I'm on a gigabit symmetrical connection and connected to the gateway directly I get full 940/940Mbps, in the VM however I get 940Mbps upload and 700-900Mbps download. All hardware offload settings are disabled for both the VM and the host.

I'm using VirtIO network adapters and multi-queue is configured and recognized by the VM, however, the only piece I can't still troubleshoot/resolve is the TX/RX queue size as seen by the VM:

Code:
vtnet0: <VirtIO Networking Adapter> on virtio_pci1
vtnet0: Ethernet address: 00:00:00:00:00:00
vtnet0: netmap queues/slots: TX 4/256, RX 4/128
000.001082 [ 503] vtnet_netmap_attach       vtnet attached txq=4, txd=256 rxq=4, rxd=128

After some research it looks like the default values for txd and rxd should be 256, for both. Multi-queue is set to 4 this is set correctly correctly, however, I can't find a way to force the queue size.

These parameters are set in the host:

Code:
Ring parameters for ens4f2:
Pre-set maximums:
RX:        4096
RX Mini:    0
RX Jumbo:    0
TX:        4096
Current hardware settings:
RX:        2048
RX Mini:    0
RX Jumbo:    0
TX:        2048

Still the VMs are setting 256 and 128 only. Any thoughts?
 
Hi,

you can set this in the pfsense at "System Tunables".

Alternative you can set it in FreeBSD at
/boot/loader.conf
Code:
hw.vtnet0.rxd=4096
hw.vtnet0.txd=4096
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!