Here are some tips to keep in mind when sizing TCP windows:
- UNIX systems typically have two to four adjustable kernel parameters related to increasing TCP window sizes.
- In Linux, they (parameters or window size??) can be modified at run time with the 'sysctl' command and will remain in effect until the next reboot. To make the changes persistent, add the following entries to the kernel configuration file, /etc/sysctl.conf, and then run 'sysctl -p'.
- The suggested 100 MB buffer size assumes a link speed of 10Gbps and RTT of 80ms. Thus, the Bandwidth Delay Product (BDP) = 10Gbps * 80ms = 100MB.
- Root access is required to make these changes to the system.
TCP Performance Tuning on End Systems: Linux
Copy and paste the text below and run on your command line (as root). It
will append your system's kernel configuration file with the appropriate
tuning parameters:
cat << END_SCRIPT >> /etc/sysctl.conf
# TCP performance tuning entries:
# Set maximum TCP window sizes to 100 megabytes
net.core.rmem_max = 104857600
net.core.wmem_max = 104857600
# Set minimum, default, and maximum TCP buffer limits
net.ipv4.tcp_rmem = 4096 524288 104857600
net.ipv4.tcp_wmem = 4096 524288 104857600
# Set maximum network input buffer queue length
net.core.netdev_max_backlog = 30000
# Disable caching of TCP congestion state (2.6 only); fixes a bug in some Linux stacks.
net.ipv4.tcp_no_metrics_save = 1
# Disable TCP timestamp support to reduce CPU use
net.ipv4.tcp_timestamps = 0
# Disable SACK support; esp beneficial for systems with very fast bus to memory interface
net.ipv4.tcp_sack = 0
END_SCRIPT
TCP Performance Tuning on End-Systems: Mac
Mac OS X parameters can be set with the sysctl command:
# Set maximum TCP window sizes to 16 megabytes
net.inet.tcp.sendspace= 16772216
net.inet.tcp.recvspace= 16772216
# Set maximum Socket Buffer sizes to 128 megabytes
kern.ipc.maxsockbuf= 134217728
In order to allow the Mac operating system to retain the parameters after a reboot, edit /etc/sysctl.conf
prompt-> echo 'net.inet.tcp.sendspace=16772216' > /etc/sysctl.conf
prompt-> echo 'net.inet.tcp.recvspace=16772216' > /etc/sysctl.conf
prompt-> echo 'kern.ipc.maxsockbuf=134217728' > /etc/sysctl.conf
These changes require root access.
TCP Performance Tuning on End-Systems: Windows
The suggested method for tuning TCP Windows under Windows XP and Windows 2000 is by utilizing DrTCP.

A Screenshot of DRTCP settings for WinXP on a 100 Mbps-attached host
(fast ethernet MTU is limited to 1500).
+ Utilize a Bandwidth-Delay calculator to determine your TCP receive window size.
Tips:
- Turn on "Window Scaling" and "Selective Acks".
- If you expect to use 90 Mb/s or faster, you should also turn on "Time Stamping".
- You must restart for the changes to take effect.