Vista TCP Window Scaling Auto Tuning May Slow Down Network Performance

TCP receive window size (RWIN) is the amount of received data (in bytes) that can be buffered during a connection. According to Wikipedia, the sending host can send only up to that amount of data before it must wait for an acknowledgment and window update from the receiving host. When a receiver advertises the window size of 0, the sender stops sending data and starts the persist timer. The persist timer is used to protect TCP from the dead lock situation. The dead lock situation could be when the new window size update from the receiver is lost and the receiver has no more data to send while the sender is waiting for the new window size update. When the persist timer expires the TCP sender sends a small packet so that the receivers ACKs the packet with the new window size and TCP can recover from such situations.

The TCP window size field controls the flow of data and is limited to between 2 and 65,535 bytes, and cannot be expanded anymore. Thus, a scaling factor is used to get a larger TCP receive window size to achieve more efficient use of high bandwidth networks. The TCP window scale option is used to increase the maximum window size from 65,535 bytes to 1 Gigabyte. Scaling up to larger TCP congestion window sizes is a part of what is necessary for TCP Tuning. The window scale option is used only during the TCP 3-way handshake. The window scale value represents the number of bits to left-shift the 16-bit window size field, and can be set from 0 (no shift) to 14.

When dealing with slow network performance in Vista, the problem may be due to the above mentioned TCP Window Scaling option, where many older routers and and packet firewalls do not properly implement TCP Window Scaling, and rewrite the window scaling factor during a transmission, and causing sending and receiving sides to assume different TCP window sizes. The situation causes malfunction Internet connection, non-stable traffic that is very slow, or network connection that is only available intermittently. In Vista, the connection may appear to start working again for no reason after a while. If “Diagnose Problem” is selected in Vista, an error message will display “Cannot communicate with primary DNS server.”

Beside, Windows Vista enhances further TCP window scaling with auto tuning feature, where TCP stack in Vista system will auto tune and adjust the RWIN size to increase the percentage of full-sized TCP segments that are used during bulk data transmission based on the network scenario it encountered. And thus it’s no longer possible to specify a custom size for the TCP/IP Receive Window (RWIN) size with the inclusion of new auto tuning feature, unless the application it self uses SO_RCVBUF. However, Vista TCP auto tuning feature may get things wrong sometimes. Instead of optimal true receive window size, incompatible and out of range RWIN size may be used.

By default, Vista in normal auto tuning level will use RWIN size of 256 bytes with a scale factor of 8. This value is not suitable for all routers and servers which does not support TCP scale factor, and continue to communicate with 65536 bytes. For Windows Vista, users can change the behavior and the way Vista automatically tune the RWIN, by using “netsh” command to set the value for “autotuninglevel” parameter.

To change the value for Receive Window Auto-Tuning Level parameter in Vista, run elevated command prompt, and then type in one of the following commands, depending on your preference how you want Vista to use the RWIN size.

netsh interface tcp set global autotuninglevel=disabled
Disable the autotunning feature in Vista completely, and fit and lock the RWIN receive window to default value 65536 bytes.

netsh interface tcp set global autotuninglevel=highlyrestricted
Allow for the receive window to grow beyond the default value, but do so very conservatively. In this mode, Vista will by default use RWIN of 16,384 bytes with a scale factor of 2.

netsh interface tcp set global autotuninglevel=restricted
Allow for the receive window to grow beyond the default value, but limit such growth in some scenarios.

netsh interface tcp set global autotuninglevel=normal
Allow for the receive window to grow to accommodate almost all scenarios. The default setting in Vista. Specifying this command mean you want to turn back on AutoTuning feature.

netsh interface tcp set global autotuninglevel=experimental
Allow for the receive window to grow to accommodate extreme scenarios. Note The experimental value can decrease performance in common scenarios. This value should be used only for research purposes.

Users should try out the various possible configurations for the Vista TCP RWIN Auto Tuning Level in order to get the best value that improve network performance and increase download speed.

Share and contribute or get technical support and help at My Digital Life Forums.



2 Responses to “Vista TCP Window Scaling Auto Tuning May Slow Down Network Performance”

  1. How to make Vista Browse faster and download faster ! « The Techie Guy’s Weblog - we get IT
    May 5th, 2008 15:47
    1

    [...] can read the seriously techie stuff here  of what it does and how Scaling Factors works etc. etc. [...]

  2. eceblogger.com » Problem with TCP auto-tuning in Vista
    July 12th, 2008 06:01
    2

    [...] Frank Hludik and he found the problem: it was the TCP auto-tuning that my Vista machine performed. Here is a longer article describing the problem and the solution, and here is a shorter one. The bottom [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe without commenting


Custom Search

New Articles

Incoming Search Terms for the Article

vista autotune - vista auto tuning - vista autotuning - vista auto tune - netsh autotuning - vista TCP window size - vista netsh - vista tcp autotune - netsh interface tcp set global autotuninglevel=highlyrestricted - vista network autotune - Receive Window Auto-Tuning Level highlyrestricted - vista slow network performance - autotune vista - autotuning vista - vista tcp tuning - autotuninglevel - vista tcp auto tuning - vista tcp window scaling - vista autotuninglevel - vista network slow - netsh vista - vista TCPWindowSize - netsh autotune - EnablePMTUDiscovery vista - netsh interface tcp set global autotuninglevel - TCP Auto Tuning - "tcp window update" - tcp autotuning vista - TCP Window Size vista - Vista TCP autotuning - Receive Window Auto-Tuning Level : highlyrestricted - vista network auto tune - vista tcp window - TCP Window Update - RWIN VISTA - vista browse network slow - vista rwin - vista autotune disable - auto tune Vista - autotuning highlyrestricted - change rwin vista - windows vista tcp window scaling - tcp autotune vista - vista Auto-Tune - Receive Window Auto-Tuning Level - auto-tune vista - vista tcp scaling - vista slow down downloads - vista rwin size - Windows Vista SP1 windows tcp scaling -