This document describes additional TCP settings that can be tuned on high-performance Linux systems. This is intended for 10-Gigabit hosts, but can also be applied to 1-Gigabit hosts. The following steps should be taken in addition to the steps outlined in TCP Performance Tuning for WAN transfers.
Configure the following /etc/sysctl.conf settings for faster TCP
- Set maximum TCP window sizes to 12 megabytes:
net.core.rmem_max = 11960320 net.core.wmem_max = 11960320
- Set minimum, default, and maximum TCP buffer limits:
net.ipv4.tcp_rmem = 4096 524288 11960320 net.ipv4.tcp_wmem = 4096 524288 11960320
- Set maximum network input buffer queue length:
net.core.netdev_max_backlog = 30000
- Disable caching of TCP congestion state (Linux Kernel version 2.6 only). Fixes a bug in some Linux stacks:
net.ipv4.tcp_no_metrics_save = 1
- Use the BIC TCP congestion control algorithm instead of the TCP Reno algorithm (Linux Kernel versions 2.6.8 to 2.6.18):
net.ipv4.tcp_congestion_control = bic
- Use the CUBIC TCP congestion control algorithm instead of the TCP Reno algorithm (Linux Kernel versions 2.6.18 and newer):
net.ipv4.tcp_congestion_control = cubic
- Set the following to 1 (should default to 1 on most systems):
net.ipv4.tcp_window_scaling =1 net.ipv4.tcp_timestamps = 1 net.ipv4.tcp_sack = 1
A reboot will be needed for changes to /etc/sysctl.conf to take effect, or you can attempt to reload sysctl settings (as root) with sysctl -p.
Reference:http://www.nas.nasa.gov/hecc/support/kb/optional-advanced-tuning-for-linux_138.html