Linux TCP/IP tuning for low throughput network

latencylinuxpacketlosssshtcp

I have two linux machines connected by a radio modem. The bandwidth is about 2kbps, with ping times of around 400ms (5% packet loss).

Currently, ssh sessions have a delay in the order of 5 seconds, although this varies. Raw telnet is similar and just opening a tcp connection seems to take forever.

Does anyone know how best tune the IP parameters in such a case?

Best Answer

Make sure you're running with a sufficiently low MTU, if possible. A single 1500-byte packet takes ~6s to transmit on your link (presuming you meant 2 kilobits per second, not bytes). And you're losing a fair number of them (probably more than 5%, if that is your packet loss with ping remote-end, not ping -s «MAX-SIZE» remote-end), requiring resending the entire packet.

Strictly speaking, IPv4 can go down to an MTU of 68 (which is too small anyway), but Linux's PMTU discovery is limited to no smaller than 552, and possibly other parts of the stack fail below 128 bytes or so.

Note that you are operating at well under a tenth of the bandwidth TCP's designers had back in 1973.