WindowsGuestDrivers/kvmnet/registry: Difference between revisions

From KVM
(Making it easier to apply registry changes.)
m (spelling correction)
Line 37: Line 37:


== Disable Windows Scaling heuristics ==  
== Disable Windows Scaling heuristics ==  
Starting from Windows Windows Vista, Windows can disregard user TCP Windows setings. This behavior could be desabled:  
Starting from Windows Windows Vista, Windows can disregard user TCP Windows setings. This behavior could be disabled:  


netsh int tcp set heuristics disabled
netsh int tcp set heuristics disabled
     possible settings are: disabled,enabled,defaul
     possible settings are: disabled,enabled,default


The corresponding Registry value (not necessary to edit if setting via netsh) is located in:
The corresponding Registry value (not necessary to edit if setting via netsh) is located in:

Revision as of 13:13, 27 August 2014

This page describes best practice for configuring Windows TCP\IP related parameters to archive the best performance with Windows guests. Those parameters are unrelated to kvm\VirtIO drivers , rather general Windows settings. After changing those setting reboot is required for the changes to effect the system.

Windows XP and 2003 registry settings

Registry settings

Save the following as a .reg file and you can apply the changes by running the file on windows.

Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\AFD\Parameters]
"DefaultSendWindow"=dword:00100000
"DefaultReceiveWindow"=dword:00100000
"FastSendDatagramThreshold"=dword:00004000


[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\Tcpip\Parameters]
"Tcp1323Opts"=dword:00000001
"TcpWindowSize"=dword:00100000
  • Tcp1323Opts - allows the scaling of the TCP window above 16k. For more info read Tcp1323Opts
  • "DefaultSendWindow", "DefaultReceiveWindow" and "TcpWindowSize" control TCP window size
  • "FastSendDatagramThreshold" - controls fast UDP transmit.

Additional links


Starting from Vista

Starting from Windows Vista the mentioned above setting are not effecting Windows networking stack.

netsh configuration tool should be used to configure the networking settings.

Disable Windows Scaling heuristics

Starting from Windows Windows Vista, Windows can disregard user TCP Windows setings. This behavior could be disabled:

netsh int tcp set heuristics disabled

   possible settings are: disabled,enabled,default

The corresponding Registry value (not necessary to edit if setting via netsh) is located in: HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\services\Tcpip\Parameters EnableWsd=0 (default: 1, recommended: 0)

TCP Auto-Tuning

To turn off the default receive window auto tuning behavior:

   netsh int tcp set global autotuninglevel=disabled

The default auto-tuning level is "normal", possible settings are:

   disabled: uses a fixed value for the tcp receive window. Limits it to 64KB.
   highlyrestricted: allows the receive window to grow beyond its default value, very conservatively.
   restricted: somewhat restricted growth of the tcp receive window beyond its default value.
   normal: default value, allows the receive window to grow to accommodate most conditions.
   experimental: allows the receive window to grow to accommodate extreme scenarios (It enables RWIN values of over 16 MB).

Compound TCP

To increase the TCP Windows with the faster rate Compound TCP should be enabled. On Vista and Windows 7, CTCP is off by default. On Windows 2008 it is on.

To enable CTCP:

   netsh int tcp set global congestionprovider=ctcp

To disable CTCP:

   netsh int tcp set global congestionprovider=none