Learn how to use TCP Segmentation Offload (TSO) in VMkernel network adapters and virtual machines to improve the network performance in workloads that have severe latency requirements.

TSO on the transmission path of physical network adapters, and VMkernel and virtual machine network adapters improves the performance of ESXi hosts by reducing the overhead of the CPU for TCP/IP network operations. When TSO is enabled, the network adapter divides larger data chunks into TCP segments instead of the CPU. The VMkernel and the guest operating system can use more CPU cycles to run applications.

To benefit from the performance improvement that TSO provides, enable TSO along the data path on an ESXi host including physical network adapters, VMkernel and guest operating system. By default, TSO is enabled in the VMkernel of the ESXi host , and in the VMXNET 2 and VMXNET 3 virtual machine adapters.

For information about the location of TCP packet segmentation in the data path, see VMware Knowledge Base article Understanding TCP Segmentation Offload (TSO) and Large Receive Offload (LRO) in a VMware environment.

Manage Software TSO in the VMkernel

If a physical network adapter experiences problems with TSO, you can temporarily enable the software simulation of TSO in the VMkernel until you troubleshoot the problems.

Procedure

  • Run these esxcli network nic software set console commands to activate or deactivate the software simulation of TSO in the VMkernel.
    • Activate the software simulation of TSO in the VMkernel.
      esxcli network nic software set --ipv4tso=1 -n vmnicX
      esxcli network nic software set --ipv6tso=1 -n vmnicX
    • Deactivate the software simulation of TSO in the VMkernel.
      esxcli network nic software set --ipv4tso=0 -n vmnicX
      esxcli network nic software set --ipv6tso=0 -n vmnicX

    where X in vmnicX represents the number of the NIC ports on the host.

    The configuration change persists across host reboots.

How to determine whether TSO is Supported on the Physical Network Adapters on an ESXi Host

Examine whether a physical network adapter offloads TCP/IP packet segmentation when you estimate the networking performance on a host that runs latency-sensitive workloads. If a physical network adapter supports TSO, then TSO is enabled by default.

Procedure

  • Run the following console command to determine whether TSO is enabled on the physical network adapters on a host.
    esxcli network nic tso get

Manage TSO on an ESXi Host

Activate TCP Segmentation Offload (TSO) on the transmission path to have the NIC divide larger data chunks into TCP segments. Deactivate TSO to have CPU perform TCP segmentation.

By default, a host uses hardware TSO if its physical adapters support it.

Procedure

  1. In the vSphere Client, navigate to the host.
  2. On the Configure tab, expand System.
  3. Click Advanced System Settings.
  4. Edit the value of the Net.UseHwTSO parameter for IPv4 and of Net.UseHwTSO6 for IPv6.
    • To activate TSO, set Net.UseHwTSO and Net.UseHwTSO6 to 1.
    • To deactivate TSO, set Net.UseHwTSO and Net.UseHwTSO6 to 0.
  5. Click OK to apply the changes.
  6. To reload the driver module of the physical adapter, run the esxcli system module set console command in the ESXi Shell on the host.
    1. To deactivate the driver, run the esxcli system module set command with the --enabled false option.
      esxcli	system module set	--enabled false --module nic_driver_module
    2. To activate the driver, run the esxcli system module set command with the --enabled true option.
      esxcli	system module set	--enabled true --module nic_driver_module

Results

If a physical adapter does not support hardware TSO, the VMkernel segments large TCP packets coming from the guest operating system and sends them to the adapter.

How to find if TSO Is Enabled on an ESXi Host

Examine whether hardware TSO is enabled in the VMkernel when you estimate the networking performance on a host that runs latency-sensitive workloads. By default, hardware TSO is enabled on an ESXi host.

Procedure

  1. In the vSphere Client, navigate to the host.
  2. On the Configure tab, expand System.
  3. Click Advanced System Settings.
  4. Examine the value of the Net.UseHwTSO and Net.UseHwTSO6 parameters.
    Net.UseHwTSO shows the TSO state for IPv4, and Net.UseHwTSO6 for IPv6. TSO is enabled if the property is set to 1.

Manage TSO on a Linux Virtual Machine

Activate TSO support on the network adapter of a Linux virtual machine so that the guest operating system redirects TCP packets that need segmentation to the VMkernel.

Prerequisites

  • Verify that ESXi supports the Linux guest operating system.

    See the VMware Compatibility Guide documentation.

  • Verify that the network adapter on the Linux virtual machine is VMXNET2 or VMXNET3.

Procedure

  • In a terminal window on the Linux guest operating system, to activate or deactivate TSO, run the ethtool command with the -K and tso options.
    • To activate TSO, run the following command:
      ethtool -K ethY tso on
    • To deactivate TSO, run the following command:
      ethtool -K ethY tso off

    where Y in ethY is the sequence number of the NIC in the virtual machine.

Manage TSO on a Windows Virtual Machine

By default, TSO is activated on a Windows virtual machine on VMXNET2 and VXMNET3 network adapters. For performance reasons, you might want to deactivate TSO.

Prerequisites

  • Verify that ESXi supports the Windows guest operating system. See the VMware Compatibility Guide documentation.
  • Verify that the network adapter on the Windows virtual machine is VMXNET2 or VMXNET3.

Procedure

  1. In the Network and Sharing Center on the Windows control panel, click the name of the network adapter.
  2. Click its name.
    A dialog box displays the status of the adapter.
  3. Click Properties, and beneath the network adapter type, click Configure.
  4. On the Advanced tab, set the Large Send Offload V2 (IPv4) and Large Send Offload V2 (IPv6) properties to Enabled or Disabled.
  5. Click OK.
  6. Restart the virtual machine.