Intel® Ethernet Adapters and Devices User Guide

ID Date Version Classification
705831 08/30/2024 Public
Document Table of Contents

Tuning Performance with SR-IOV

When SR-IOV is enabled in Hyper-V, the following steps can help to improve performance between VM to VM and VM to Host.

From host OSes on both Host 1 and Host 2:

  1. Enable RSS on the PF and vSwitch:

    Enable-NetAdapterRss -name "ADAPTER_NAME"
    
  2. Enable 4 queues per VF:

    Set-VMNetworkAdapter -VMName "YOUR_TEST_VM_NAME" -IovQueuePairsRequested 4
    
    Get-VmNetworkAdapter -VMName * | where {$_.SwitchName -eq "YOUR_TEST_SWITCH_NAME"} |
      Set-VmNetworkAdapter -IovQueuePairsRequested 4
    
  3. Ensure the VMs have at least twice as many vCPUs as RSS queues. In this case, set the number of total processors in the VM to 8. To do this:

    1. Turn off the VM.

    2. In the VM, click Settings.

    3. Under Hardware, select Processor.

    4. Change the value of Number of virtual processors to 8.

    5. Apply the change.

  4. For Windows Server 2022, issue the following command while the VM is in the off state:

    Set-VMProcessor -VMName "YOUR_VM_Name" -HwThreadCountPerCore 1 -Count 8
    

In both guest OSes VM1 and VM2:

  1. Set RSS queues to 4 for all VFs in the guest OSes:

    Set-NetAdapterRss -InterfaceDescription *adaptive* -NumberOfReceiveQueues 4
    
  2. Update the number of queues in the guest OS:

    Set-NetAdapterAdvancedProperty -Name "your_adapter_name_from_guest_os" -DisplayName
    "Maximum Number of RSS Queues" -DisplayValue "8 Queues"
    
Note:

In the locations where there are settings for the number of queues, that value can be anything from 1 to 16. If you want more total throughput, increase the number of queues. When updating the number of queues, you must set IovQueuePairsRequested to a value that is equal to or greater than the number of queues you want to use in the VM.