Blog
Linux
Tuning Linux TCP 2.4 kernel | Tuning Linux TCP 2.4 kernel |
|
|
|
| Written by Administrator | |
| Apr 27, 2003 at 12:48 PM | |
|
From: http://www.psc.edu/networking/perf_tune.html#Linux Tuning a Linux 2.4 system Enabling and disabling some of the advanced features of TCP: (Usually it is a good idea for these to be enabled) /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: 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: /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/networking/ip-sysctl.txt.html Tuning the default and maximum window sizes: /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: 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_DIRal documentation on sysctl variables: http://www.linuxhq.com/kernel/v2.4/doc/networking/ip-sysctl.txt.html Tuning the default and maximum window sizes: /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: 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.txt If 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 /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: 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%3/Documentation/networking/ip-sysctl.txt If 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 /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: 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.txt If 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 /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: echo 8388608 > /proc/sys/net/core/wmem_maCbr /> echo "4096 65536 4194304" > /proc/sys/net/ipv4/tcp_wmem You will find a short description in LINUX-SOURCE_DIR/Documentation/networking/ip-sysctl.txt If 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 /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: 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.txt If 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 /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 x 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.txt If 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 /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: 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.txt If 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 /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_The following values would be reasonable for path with a large BDP: 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.txt If 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 /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: 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.txt If 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 p2Fsys/net/core/rmem_default - default receive window /proc/sys/net/core/rmem_max - maximum receive window /proc/sys/net/core/wmem_defarmem - 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: 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.txt If 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 p2Fsys/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: 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.txt If 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 p2Fsys/net/core/rult - 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: 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.txt If 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 p2Fsys/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: 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.txt If 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 tmem_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: 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.txt If 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 p2Fsys/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: 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.txt If you would like these changes to be preserved across reboots,o providing complete instrumentation of the TCP stack, it has features for doing auto tuning of send and receive buffers. For p2Fsys/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: 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.txt If 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. |
| <Previous | Next> |
|---|