[Babel-users] TCP "thin streams" optimisation in Linux

Juliusz Chroboczek jch at pps.jussieu.fr
Sun Jan 9 18:57:55 UTC 2011


Hi,

If you're using ssh logins over lossy networks (such as many mesh
networks), you may be annoyed at the random delays you get after a loss
event.  This is due to the fact that modern TCP is optimised for bulk
transfer, and that it behaves badly in the presence of packet loss when
there are less than 4 packets in flight.

Linux 2.6.34 and later is able to use a more aggressive variant of TCP
when a given TCP flow is detected as being "thin", i.e. as having less
than 4 packets in flight.  While this violates a number of TCP RFCs, the
aggressive TCP variant is only used with "thin" streams, and hence
should not cause any congestion issues.  However, please do not enable
this feature on web servers and more generally systems that handle lots
of connections.

This optimisation is enabled by putting the following in
/etc/sysctl.conf:

    net.ipv4.tcp_thin_dupack = 1
    net.ipv4.tcp_thin_linear_timeouts = 1

Since it's a sender-only modification to TCP, the effect will be most
dramatic if you do that on the client.

For more information, please see

  /usr/src/linux/Documentation/networking/tcp-thin.txt

which is conveniently available as

  http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/networking/tcp-thin.txt

                                        Juliusz



More information about the Babel-users mailing list