Boost your VMXNET3 for Maximum Performance

Boosting the performance of VMXNET3 on Windows Server 2012 R2

We have hade a numerous issues with slugish network performacen, or high netowrk latenancy on our MS SQL vm. If you have had such bad luck, especially with MS SQL Server and async_network_io, then you know how “easy” is to track down the issue.

Although there are loads of people, saying that “If you run e1000 you will be OK, and you won’t have those problems” this adapter is quite old and depricated and it’s no longer supported on Server 2012 . Not to mention that, it can cause more harm then good Check this out

Anyways, you decide to go for e1000(e), you should consider the points abouve. If you decide to play safe but do some more work tweaking it for performance - use VMXNET3


  1. Open an CMD promt with elevated privileges
netsh int tcp show global
  1. Identifiy which of the enabled settings and which options have to be disabled.
  • These are the default settings of our NIC
TCP Global Parameters
----------------------------------------------
Receive-Side Scaling State          : enabled
Chimney Offload State               : enabled
NetDMA State                        : disabled
Direct Cache Access (DCA)           : disabled
Receive Window Auto-Tuning Level    : normal
Add-On Congestion Control Provider  : none
ECN Capability                      : disabled
RFC 1323 Timestamps                 : disabled
Initial RTO                         : 3000
Receive Segment Coalescing State    : enabled
Non Sack Rtt Resiliency             : disabled
Max SYN Retransmissions             : 2
  • In order to optimize our VMXNET3 addapter we are going to disable som of the advanced TCP features
netsh int tcp set global chimney=Disabled
netsh int tcp set global autotuninglevel=Disabled
netsh int tcp set supplemental custom congestionprovider=none
netsh int tcp set global ecncapability=Disabled
netsh int ip set global taskoffload=disabled
netsh int tcp set global timestamps=Disabled
  1. TCP Segmentation Offload
  • TSO is used to offload packet processing from the CPU to the NIC. Disabled is the preferred setting.
  • Bellow are the default values we had on our server
Name                      DisplayName                    DisplayValue                   RegistryKeyword RegistryValue
----                      -----------                    ------------                   --------------- -------------
Ethernet                Interrupt Moderation           Enabled                        *InterruptMo... {1}
Ethernet                IPv4 Checksum Offload          Rx & Tx Enabled                *IPChecksumO... {3}
Ethernet                Jumbo Packet                   Standard 1500                  *JumboPacket    {1514}
Ethernet                IPv4 TSO Offload               Enabled                        *LsoV1IPv4      {1}
Ethernet                Large Send Offload V2 (IPv4)   Disabled                       *LsoV2IPv4      {0}
Ethernet                Large Send Offload V2 (IPv6)   Disabled                       *LsoV2IPv6      {0}
Ethernet                Maximum number of RSS Proce... --                             *MaxRssProce... {--}
Ethernet                Priority / VLAN tag            Priority & VLAN Enabled        *PriorityVLA... {3}
Ethernet                Recv Segment Coalescing (IPv4) Enabled                        *RscIPv4        {1}
Ethernet                Recv Segment Coalescing (IPv6) Enabled                        *RscIPv6        {1}
Ethernet                Receive Side Scaling           Enabled                        *RSS            {1}
Ethernet                RSS Base Processor Number      --                             *RssBaseProc... {--}
Ethernet                Speed & Duplex                 Auto Negotiation               *SpeedDuplex    {0}
Ethernet                TCP Checksum Offload (IPv4)    Rx & Tx Enabled                *TCPChecksum... {3}
Ethernet                TCP Checksum Offload (IPv6)    Rx & Tx Enabled                *TCPChecksum... {3}
Ethernet                UDP Checksum Offload (IPv4)    Rx & Tx Enabled                *UDPChecksum... {3}
Ethernet                UDP Checksum Offload (IPv6)    Rx & Tx Enabled                *UDPChecksum... {3}
Ethernet                Wake on magic packet           Enabled                        *WakeOnMagic... {1}
Ethernet                Wake on pattern match          Enabled                        *WakeOnPattern  {1}
Ethernet                Enable adaptive rx ring sizing Enabled                        EnableAdapti... {1}
Ethernet                Wake-on-LAN                    Enabled                        EnableWakeOnLan {1}
Ethernet                Rx Ring #1 Size                --                             MaxRxRing1Le... {--}
Ethernet                Rx Ring #2 Size                --                             MaxRxRing2Le... {--}
Ethernet                Max Tx Queues                  --                             MaxTxQueues     {--}
Ethernet                Tx Ring Size                   --                             MaxTxRingLength {--}
Ethernet                MAC Address                    --                             NetworkAddress  {--}
Ethernet                Large Rx Buffers               --                             NumRxBuffers... {--}
Ethernet                Small Rx Buffers               --                             NumRxBuffers... {--}
Ethernet                Offload IP Options             Enabled                        OffloadIpOpt... {1}
Ethernet                Offload TCP Options            Enabled                        OffloadTcpOp... {1}
Ethernet                Offload tagged traffic         Enabled                        OffloadVlanE... {1}
Ethernet                Receive Throttle               --                             RxThrottle      {--}
Ethernet                VLAN ID                        --                             VlanId          {--}
  • Run in elevated PowerShell
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”Offload IP Options” -DisplayValue “Disabled” -NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”Offload tagged traffic” -DisplayValue “Disabled” –NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”Offload TCP Options” -DisplayValue “Disabled” -NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”Recv Segment Coalescing (IPv4)” -DisplayValue “Disabled” –NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”Recv Segment Coalescing (IPv6)” -DisplayValue “Disabled” -NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”TCP Checksum Offload (IPv4)” -DisplayValue “Disabled” –NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”TCP Checksum Offload (IPv6)” -DisplayValue “Disabled” -NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”UDP Checksum Offload (IPv4)” -DisplayValue “Disabled” –NoRestart
Set-NetAdapterAdvancedProperty "Ethernet" -DisplayName ”UDP Checksum Offload (IPv6)” -DisplayValue “Disabled” -NoRestart
  • How can we test it ?

I recommend running a test before and after changes have been done.

There is pack distributed by Microsoft with a “advanced debugging tools” - PsTools

  • We are going to use only “psping” to determin the network latenancy
  • Assuming that you have a target and client host, you have to run:
.\psping.exe -s **TARGET_IP**:50000

This will simply run a psping proccess which will listen for connections on port 50000.

  • On the client machine, to test the connection we are going to run
.\psping.exe -4 -l 1024 -n 1000000 -h **TARGET_IP**:50000

Reference link LifeOfAGeekAdmin