virtio-win

Introduction to Receive Segment Coalescing (RSC)

RSC is a hardware-based receive acceleration mechanism, reducing CPU load by offloading the task of combining multiple fragments of a large payload to single packet which is then delivered to the OS network stack. When network transfers utilize large packets, this can provide a significant boost in throughput. One benchmark showed a 5x increase (from 7Gbps to 35 Gbps) in host-to-guest data throughput.

RSC is supported by the network stack starting from Windows Server 2012/Windows 8.

See https://technet.microsoft.com/en-us/library/hh997024(v=ws.11).aspx for further details.

RSC for Virtualized Workloads

RSC is especially effective in virtualized workloads in these circumstances:

Requirements for RSC

RSC can be enabled when all of the following are true:

  1. On the host:
    1. The TAP device has the TX checksum offload enabled
    2. TCP Segmentation Offload is enabled
  2. On the guest:
    1. The virtio driver is installed
    2. RSC is operational within the guest network stack.

Host configuration

The host configuration can be verified by running

ethtool -k <TAP device name>

The TAP device name is the QEmu command-line parameter ifname=<TAP device name> in -netdev.

A working host output would be:

Further performance benefit can be gained by performing NIC coalescing:

ethtool -c <nic name>

Typical output:

This parameter configures the maximum allowed time between packets for the NIC to combine in hardware.

Note: The unavailability of these features on the host may not indicate a misconfiguration on the host. The guest needs to request this functionality too.

Guest configuration

The guest configuration can be verified in PowerShell:

Get-NetAdapterRsc | Format-List

A working guest output would be:

Possible failure reason causes:

See https://github.com/virtio-win/kvm-guest-drivers-windows/issues/1026 for more details.

HCK RSC tests

HCK “RSC tests” is currently not part of any playlist. For engineering purposes in order to pass this specific test and only for this specific test use a special addition to virtio-net-pci command line as follows: “guest_rsc_ext=on,rsc_interval=1000000”. Note that this device parameter is not compatible with any other test as well as with regular netkvm functionality.