|
楼主 |
发表于 2005-2-7 16:00:12
|
显示全部楼层
QUOTE
Tuning a Linux 2.4 systemEnabling and disabling some of the advanced features of TCP:(Usually it is a good idea for these to be enabled)
QUOTE
/proc/sys/net/ipv4/tcp_timestamps /proc/sys/net/ipv4/tcp_window_scaling /proc/sys/net/ipv4/tcp_sack
To enable all these features, for example, do the following as root:
QUOTE
echo 1 > /proc/sys/net/ipv4/tcp_timestamps echo 1 > /proc/sys/net/ipv4/tcp_window_scaling echo 1 > /proc/sys/net/ipv4/tcp_sack
Path MTU discovery can be enabled and disabled using the following boolean sysctl variable:
QUOTE
/proc/sys/net/ipv4/ip_no_pmtu_disc
But be on the lookout for blackholes if this is enabled, as indicated at the beginning of the document. Please see the following URL for additional documentation on sysctl variables:http://www.linuxhq.com/kernel/v2.4/doc/net...sysctl.txt.htmlTuning the default and maximum window sizes:
QUOTE
/proc/sys/net/core/rmem_default - default receive window /proc/sys/net/core/rmem_max - maximum receive window /proc/sys/net/core/wmem_default - default send window /proc/sys/net/core/wmem_max - maximum send window /proc/sys/net/ipv4/tcp_rmem - memory reserved for TCP rcv buffers /proc/sys/net/ipv4/tcp_wmem - memory reserved for TCP snd buffers
The following values would be reasonable for path with a large BDP:
QUOTE
echo 8388608 > /proc/sys/net/core/wmem_max echo 8388608 > /proc/sys/net/core/rmem_max echo "4096 87380 4194304" > /proc/sys/net/ipv4/tcp_rmem echo "4096 65536 4194304" > /proc/sys/net/ipv4/tcp_wmem
You will find a short description in LINUX-SOURCE_DIR/Documentation/networking/ip-sysctl.txtIf you would like these changes to be preserved across reboots, it may be a good idea to add these commands to your /etc/rc.d/rc.local file.Linux users may want to look into the Web100 project. In addition to providing complete instrumentation of the TCP stack, it has features for doing auto tuning of send and receive buffers.For paths with a very large BDP, it also has some features that will allow you to get better transfers.User testimonial: With the tuned TCP stacks it was possible to get a maximum throughput between 1.5 - 1.8 Mbit/s via a 2Mbit/s satellite link, measured with netperf. |
|