Aparte del tema del MTU está el tema del RWIN ... ver artículo de Luke en foro de Jazztel:
RWIN: Solución a bastantes problemas de velocidad
Y luego esta información sobre el control de los valores en Linux:
======================================================================
The maximum buffer sizes for all sockets can be set with /proc variables:
/proc/sys/net/core/rmem_max - maximum receive window
/proc/sys/net/core/wmem_max - maximum send window
These determine the maximum acceptable values for SO_SNDBUF and SO_RCVBUF (arguments to setsockopt() system call). The kernel sets the actual memory limit to twice the requested value (effectively doubling rmem_max and wmem_max) to provide for sufficient memory overhead.
The per connections memory space defaults are set with two 3 element arrays:
/proc/sys/net/ipv4/tcp_rmem - memory reserved for TCP rcv buffers
/proc/sys/net/ipv4/tcp_wmem - memory reserved for TCP snd buffers
These are arrays of three values: minimum, default and maximum that are used to bound autotuning and balance memory usage while under global memory stress.
The following values would be reasonable for path with a 4MB BDP (You must be root):
echo 2500000 > /proc/sys/net/core/wmem_max
echo 2500000 > /proc/sys/net/core/rmem_max
echo "4096 5000000 5000000" > /proc/sys/net/ipv4/tcp_rmem
echo "4096 65536 5000000" > /proc/sys/net/ipv4/tcp_wmem
All current Linux 2.4 and 2.6 versions include sender side autotuning, so the actual sending socket buffer (wmem value) will be dynamically updated for each connection. You can check to see if receiver side autotuning is present an enabled by looking at the file:
/proc/sys/net/ipv4/tcp_moderate_rcvbuf
If it is present and enabled (value 1) (and the TCP receiver buffer size is not explicitly adjusted), the receiver socket buffer size (rmem value) will be dynamically updated for each connection. Generally autotuning should not be disabled unless there is a specific need, e.g. comparison studies of TCP performance.
NB:Manually adjusting socket buffer sizes with setsockopt() implicitly disables autotuning. Application that are optimized for other operating systems may be non-optimal on Linux.
If autotuning is not present (Linux 2.4 before 2.4.27 or Linux 2.6 before 2.6.7), you may want to get a newer kernel. Alternately, you can set the global default receive socket buffer size by setting the middle value of the tcp_rmem array.
Do not adjust tcp_mem unless you know exactly what you are doing. This array determines how the system balances the total network memory usage against other memory usage, such as disk buffers. It is initialized at boot time to appropriate fractions of total system memory.
You do not need to adjust rmem_default or wmem_default (at least not for TCP tuning). These are the default buffer sizes for non-TCP sockets (e.g. unix domain sockets, UDP, etc).
All standard advanced TCP features are on by default. You can check them by cat'ing the following /proc files:
/proc/sys/net/ipv4/tcp_timestamps
/proc/sys/net/ipv4/tcp_window_scaling
/proc/sys/net/ipv4/tcp_sack
Linux supports both /proc and sysctl (using alternate forms of the variable names - net.core.rmem_max) for inspecting and adjusting network tuning parameters. The following is a useful shortcut for inspecting all tcp parameters:
sysctl -a | fgrep tcp
For additional information on kernel variables, look at the documentation included with your kernel source, typically in some location such as /usr/src/linux-/Documentation/networking/ip-sysctl.txt. There is a very good (but slightly out of date) tutorial on network sysctl's at (link roto)
If you would like to have these changes to be preserved across reboots, you can add the tuning commands to your /etc/rc.d/rc.local file.
Autotuning was prototyped under the Web100 project. Web100 also provides complete TCP instrumentation and some additional features to improve performance on paths with very large BDP.