Learn how to use Large Receive Offload (LRO) to reduce the CPU overhead for processing packets that arrive from the network at a high rate.
LRO reassembles incoming network packets into larger buffers and transfers the resulting larger but fewer packets to the network stack of the host or virtual machine. The CPU has to process fewer packets than when LRO is deactivated, which reduces its utilization for networking especially in the case of connections that have high bandwidth.
To benefit from the performance improvement of LRO, enable LRO along the data path on an ESXi host including VMkernel and guest operating system. By default, LRO is activated in the VMkernel and in the VMXNET3 virtual machine adapters.
For information about the location of TCP packet aggregation in the data path, see VMware Knowledge Base article Understanding TCP Segmentation Offload (TSO) and Large Receive Offload (LRO) in a VMware environment.
Manage Hardware LRO for All VMXNET3 Adapters on an ESXi Host
Activate the hardware capabilities of host physical adapters to aggregate incoming TCP packets for VXMNET3 VM adapters by using the LRO technology instead of consuming resources for assembling in the guest operating system.
Procedure
- In the vSphere Client, navigate to the host.
- On the Configure tab, expand System.
- Click Advanced System Settings.
- Edit the value of the Net.Vmxnet3HwLRO parameter.
- To activate hardware LRO, set Net.Vmxnet3HwLRO to 1.
- To deactivate hardware LRO, set Net.Vmxnet3HwLRO to 0.
- Click OK to apply the changes.
Manage Software LRO for All VMXNET3 Adapters on an ESXi Host
Use software LRO in the VMkernel backend of VMXNET3 adapters to improve networking performance of virtual machines if the host physical adapters do not support hardware LRO.
vSphere supports software LRO for both IPv4 and IPv6 packets.
Prerequisites
Procedure
- In the vSphere Client, navigate to the host.
- On the Configure tab, expand System.
- Click Advanced System Settings.
- Edit the value of the Net.Vmxnet3SwLRO parameter for VMXNET3 adapters.
- To activate software LRO, set Net.Vmxnet3SwLRO to 1.
- To deactivate software LRO, set Net.Vmxnet3SwLRO to 0.
- Click OK to apply the changes.
Determine Whether LRO Is Enabled for VMXNET3 Adapters on an ESXi Host
Examine the status of LRO on an ESXi when you estimate the networking performance on a host that runs latency-sensitive workloads.
Prerequisites
Procedure
- In the vSphere Client, navigate to the host.
- On the Configure tab, expand System.
- Click Advanced System Settings.
- Examine the value of the LRO parameters for VMXNET2 and VMXNET3.
- For hardware LRO, examine the Net.Vmxnet3HwLRO parameter. If it is equal to 1, hardware LRO is enabled.
- For software LRO, examine the Net.Vmxnet3SwLRO parameter. If it is equal to 1, hardware LRO is enabled.
Change the Size of the LRO Buffer for VMXNET 3 Adapters
You can change the size of the buffer for packet aggregation for virtual machine connections through VMXNET 3 network adapters. Increase the buffer size to reduce the number of TCP acknowledgments and improve efficiency in workloads.
Procedure
Activate or Deactivate LRO for All VMkernel Adapters on an ESXi Host
Use LRO in the VMkernel network adapters on an ESXi host to improve the networking performance for incoming infrastructure traffic.
Procedure
- In the vSphere Client, navigate to the host.
- On the Configure tab, expand System.
- Click Advanced System Settings.
- Edit the value of the Net.TcpipDefLROEnabled parameter.
- To activate LRO for the VMkernel network adapters on the host, set Net.TcpipDefLROEnabled to 1.
- To deactivate software LRO for the VMkernel network adapters on the host, set Net.TcpipDefLROEnabled to 0.
- Click OK to apply the changes.
Change the Size of the LRO Buffer for VMkernel Adapters
You can change the size of the buffer for packet aggregation for VMkernel connections. Increase the buffer size to reduce the number of TCP acknowledgments and improve efficiency in the VMkernel.
Procedure
Manage LRO on a VMXNET3 Adapter on a Linux Virtual Machine
If LRO is enabled for VMXNET3 adapters on the host, activate LRO support on a network adapter on a Linux virtual machine to ensure that the guest operating system does not spend resources to aggregate incoming packets into larger buffers.
Prerequisites
Verify that the Linux kernel is 2.6.24 and later.
Procedure
- ♦ In a terminal window on the Linux guest operating system, run the ethtool command with the -K and lro options.
- To activate LRO, run the following command:
ethtool -K ethY lro on
where Y in ethY is the sequence number of the NIC in the virtual machine.
- To deactivate LRO, run the following command:
ethtool -K ethY lro off
where Y in ethY is the sequence number of the NIC in the virtual machine.
- To activate LRO, run the following command:
Manage LRO on a VMXNET3 Adapter on a Windows Virtual Machine
If LRO is enabled for VMXNET3 adapters on the host, activate LRO support on a network adapter on a Windows virtual machine to ensure that the guest operating system does not spend resources to aggregate incoming packets into larger buffers.
On Windows, the LRO technology is also referred to as Receive Side Coalescing (RSC).
Prerequisites
- Verify that the virtual machine runs Windows Server 2012 and later or Windows 8 and later.
- Verify that the virtual machine compatibility is ESXi 6.0 and later.
- Verify that the version of the VMXNET3 driver installed on the guest operating system is 1.6.6.0 and later.
- Verify that LRO is enabled globally on a virtual machine that runs Windows Server 2012 and later or Windows 8 and later. See Manage LRO Globally on a Windows Virtual Machine.
Procedure
Manage LRO Globally on a Windows Virtual Machine
To use Large Receive Offload (LRO) on a VMXNET3 adapter on a virtual machine that runs Windows 8 and later or Windows Server 2012 and later, you must enable LRO globally on the guest operating system. On Windows, the LRO technology is also referred to as Receive Side Coalescing (RSC).
Procedure
What to do next
Enable LRO for the VMXNET3 adapter on the Windows 8 and later or Windows Server 2012 virtual machine. See Manage LRO on a VMXNET3 Adapter on a Windows Virtual Machine.