Home Traffic Analysis Traffic Analysis General Internet Speed Issue - How to use TCP window scaling option

From few simplifying test results on previous article "Internet Speed Issue - Why TCP window size is matter", indeed TCP window size made difference of TCP throughput and download & upload performance. Again, I don't think everybody move forward to TCP window scaling option. If you don't have high speed connections or unstable such as home users, don't need this option. It might bring worse TCP throughput than before. However, certain circumstance, this option is very useful. For example, data replicating from location A and B that has dedicated Gigabit links all the way device to device. Tuned proper TCP window size will increase huge TCP throughput. Of course link condition should be well maintained by network administrator. Let's how we can tune TCP window size on your device.


Microsoft Windows OSs

Microsoft Operating Systems set window size in following guides. If none of the preceding sets the window size, the default receive window size is set as follows:

  • For a transmission below 1 megabit per second (Mbps), 8 KB.
  • For a 1-100 Mbps transmission, 17 KB.
  • For a transmission greater than 100 Mbps, 64 KB.

Reference : http://msdn.microsoft.com/en-us/library/ms819736.aspx

There are couples of way to change TCP window size. You can just edit Registry by Regedit form DOS prompt. But there are tons of utilities to automatically change it for you. One I am using is SG TCP Optimizer. It is free.

Once you execute the TCP window tuning software, below three parameters are configured.
The software has created below parameters under TCPIP > Parameters >.

- Tcp1323Opts ;
Value data= 1. (Hexadecimal)

This parameter is used for indicating the use of RFC 1323 Timestamp and Window Scale TCP options. Sender put flag bits as 0 means using window scaling, and bit 1 indicated TCP window scaling option will be used.

- TcpWindowSize;
Value data = 0 ~ 2^30-1 = 0 ~ 1073741823
Indication of the maximum TCP receive window size offered. Most of the cases, this Value data is match with a value data on GlobalMaxTcpWindosSize parameter.

- GlobalMaxTcpWindowSize;
Value data = 0 ~ 2^30-1 = 0 ~ 1073741823
This parameter can be used to set the receive window on a per-interface basis. Most of the cases, this Value data is match with a value data on TcpWindowSize parameter.

Below picture is screenshot of my testing device which was optimized by the above software. TCP window size is configured as 256 Kbytes. (Hexadecimal : 3ebc0)




Change below files with proper value on device you want to enable RFC1323.   

1. /proc/sys/net/ipv4/tcp_window_scaling; Set "1" to activate window scaling option(RFC 1323)
2. /proc/sys/net/ipv4/tcp_timestamps; Set "1" to activate timestamps
3. /proc/sys/net/core/rmem_max; Set maximum size of TC receive window.
4. /proc/sys/net/core/wmem_max; Set maximum size of TCP transmit window.
5. /proc/sys/net/core/rmem_default; Set default size of TCP receive window.
6. /proc/sys/net/core/wmem_default; Set default size of TCP transmit window.


Cisco Router

In order to enable TCP window scaling option, TCP window size is set to a number greater than 65,535.  The range of Window size is from 0 to 1,073,741,823 (2^30 - 1). The default value is 4128 bytes.

Router#conf t
Router(config)# ip tcp window-size 256000


Last Updated (Thursday, 11 June 2009 17:41)

Smart Link
Content View Hits : 1992328
Highly recommended firewall vendor?
Google Translation
English Arabic Chinese (Simplified) Czech Dutch French German Italian Korean Portuguese Russian Spanish Filipino Vietnamese Thai Turkish
BGP routing issue?
World Route Servers
Who's Online
We have 46 guests online