Low throughput for UDP workloads on Windows virtual machines
search cancel

Low throughput for UDP workloads on Windows virtual machines

book

Article ID: 321309

calendar_today

Updated On:

Products

VMware vSphere ESXi

Issue/Introduction

In vSphere 5.1 and later, when a Windows virtual machine transmits UDP packets larger than 1024 bytes, you experience lower than expected or oscillating throughput even when other traffic is negligible. In case of a video streaming server, video playback freezes.

For every UDP packet larger than 1024 bytes, the Windows network stack waits for a transmit completion interrupt before sending the next packet. Unlike for earlier releases, vSphere 5.1 and later do not provide a transparent workaround of the situation.


Environment

VMware vSphere ESXi 5.1
VMware vSphere ESXi 5.5
VMware vSphere ESXi 6.0

Resolution

To work around this issue, apply one of these solutions:
 

  • Modify the registry of the Windows guest OS
  • Modify vNIC coalescing settings
  • Modify ESXi host coalescing settings

Modify the registry of the Windows guest OS

Caution: This article contains information about modifying the Windows registry. Before making any registry modifications, ensure that you have a current and valid backup of the registry and the virtual machine. For more information on backing up and restoring the registry, see the Microsoft article 136393.
  1. Locate the HKLM\System\CurrentControlSet\Services\Afd\Parameters registry key.
  2. Add the value FastSendDatagramThreshold of type DWORD equal to 1500.

Note: The preceding link is correct as of April 13, 2018. If you find the link is broken, provide feedback and a VMware employee will update the link.

Modify vNIC coalescing settings

If the Windows virtual machine has a VMXNET3 vNIC adapter, configure one of these parameters in the .vmx file of the virtual machine. Use the vSphere Web Client or directly modify the .vmx file.

ActionParameterValue
Increase the interrupt rate of the virtual machine to a higher rate than expected packet rate. Default interrupt rate is 4000 interrupts per second.
For example, if the expected packet rate is 15000 interrupts per second, set the interrupt rate to 16000 interrupts per second - set the ethernetX.coalescingScheme parameter to rbc and the ethernetX.coalescingParams parameter to 16000.
ethernetX.coalescingSchemerbc
ethernetX.coalescingParams16000
Disable coalescing. Recommended only for low throughput or latency-sensitive workloads. For more information about configuring low-latency workloads, see Best Practices for Performance Tuning of Latency-Sensitive Workloads in vSphere VMs.ethernetX.coalescingSchemedisabled
Revert to the coalescing algorithm from earlier ESXi releases.
Note: The option to revert to the earlier algorithm is not available in ESXi 6.0 and later.
ethernetX.coalescingSchemecalibrate

X next to ethernet stands for the sequence number of the vNIC in the virtual machine.

Modify vNIC coalescing settings from the vSphere Web Client

  1. Power off the virtual machine.
  2. Right-click the virtual machine and select Edit Settings.
  3. Click the Options tab and expand Advanced.
  4. Click Edit Configuration.
  5. Click Add Row.
  6. Add or edit the coalescing algorithm parameters.
  7. Click OK and click OK.
  8. Power on the virtual machine.

Modify vNIC coalescing setting directly in the .vmx file

  1. Power off the virtual machine.
  2. Download the .vmx file of the virtual machine from the datastore.
  3. Open the file in a text editor.
  4. Add your coalescing parameter to the file.
  5. Upload the file back to the datastore.
  6. Power on the virtual machine.

Modify ESXi host coalescing settings

Caution: This approach affects all virtual machines and all virtual NICs on the host.

Modify the coalescing settings of the ESXi host from the vSphere Web Client

  1. In the vSphere Web Client, navigate to the host in the vSphere inventory.
  2. Select the Manage tab.
  3. Select Advanced Settings under System.
  4. Configure one of these host parameters:
    • Set a default interrupt rate higher than the expected packet rate. For example, set it 16000 if 15000 interrupts per second is expected.
      Set Net.CoalesceRBCRate to 16000
    • Disable coalescing. Recommended only for low throughput or latency-sensitive workloads. For more information about configuring low-latency workloads, see Best Practices for Performance Tuning of Latency-Sensitive Workloads in vSphere VMs.
      Set Net.CoalesceDefaultOn to 0
    • Revert to coalescing scheme from earlier ESXi releases.
      Set Net.CoalesceVersion to 1

      Note: Reverting to the earlier algorithm is not available in vSphere 6.0 and later. For a list of available coalescing parameters in vSphere 6.0, see the Low Throughput for UDP Workloads on Windows Virtual Machines section of the vSphere 6.0 Troubleshooting guide.
       
  5. Click OK.
  6. Reboot any impacated virtual machines to apply the new coalescing settings.

Modify the coalescing settings of the ESXi host through vCLI commands

Use the esxcli system settings advanced set command to modify one of these advanced host options:

  • Set a default interrupt rate higher than the expected packet rate. For example, set it 16000 if 15000 interrupts per second is expected.

    esxcli system settings advanced set -o /Net/CoalesceRBCRate -i 16000

     
  • Disable coalescing. Recommended only for low throughput or latency-sensitive workloads. For more information about configuring low-latency workloads, see Best Practices for Performance Tuning of Latency-Sensitive Workloads in vSphere VMs.

    esxcli system settings advanced set -o /Net/CoalesceDefaultOn -i 0

     
  • Revert to the coalescing scheme from earlier ESXi releases.

    esxcli system settings advanced set -o /Net/CoalesceVersion -i 1


    Notes:
    • Reverting to the earlier algorithm is not available in vSphere 6.0 and later. For a list of available coalescing parameters in vSphere 6.0, see the Low Throughput for UDP Workloads on Windows Virtual Machines section of the vSphere 6.0 Troubleshooting guide.
    • Virtual machines must be power cycled to pick up the new coalescing settings.
Additional Information
 
For more information about this issue in vSphere 5.5, see the Low Throughput for UDP Workloads on Windows Virtual Machines section in the VMware vSphere 5.5 Documentation.
 
For translated versions of this article, see: