Debian tcp – optimize for clients with packet loss


I have a debian server with a bandwidth of 100 Mbps. My clients are mostly connected using 3G networks, for a duration of 30 mn in average. A lot of them have packet loss, rarely, but each time a packet is lost, the tcp link is stalled for 30 seconds or more before everything goes back to normal.

The server uses about 5% of the cpu, memory, and bandwidth.

I have come accross a list of options for debian and tunning the tcp stack:

I wonder which parameter would allow the server or the client to stall less time when a packet is lost. Any idea ?

Best Answer

It is very hard to tune out the problems of packet loss - TCP really doesn't like it, and assumes very strongly that it is a sign of use over capacity rather than an unreliable network. With a 3G link that is ... not always true. documents how to select alternative congestion control algorithms, and has notes about some of the options available in the Linux kernel.

You almost certainly want tcp_frto enabled, since it is designed to work well with intermittent loss environments like radio network, and unlike the Internet.

You might consider raising tcp_maxreordering above the default, if you are experiencing loss while windows are large.

Make sure that SACK and similar features are on; I doubt you have turned them off, but just in case...

Beyond that, there isn't that much that can really help you out here. The congestion control response and, especially, recovery is really the key to improving performance. Don't expect miracles, though, and whatever you do, don't assume that anything will make life better without testing it thoroughly!