Back to home page

OSCL-LXR

 
 

    


0001 .. SPDX-License-Identifier: GPL-2.0
0002 
0003 ====================
0004 Thin-streams and TCP
0005 ====================
0006 
0007 A wide range of Internet-based services that use reliable transport
0008 protocols display what we call thin-stream properties. This means
0009 that the application sends data with such a low rate that the
0010 retransmission mechanisms of the transport protocol are not fully
0011 effective. In time-dependent scenarios (like online games, control
0012 systems, stock trading etc.) where the user experience depends
0013 on the data delivery latency, packet loss can be devastating for
0014 the service quality. Extreme latencies are caused by TCP's
0015 dependency on the arrival of new data from the application to trigger
0016 retransmissions effectively through fast retransmit instead of
0017 waiting for long timeouts.
0018 
0019 After analysing a large number of time-dependent interactive
0020 applications, we have seen that they often produce thin streams
0021 and also stay with this traffic pattern throughout its entire
0022 lifespan. The combination of time-dependency and the fact that the
0023 streams provoke high latencies when using TCP is unfortunate.
0024 
0025 In order to reduce application-layer latency when packets are lost,
0026 a set of mechanisms has been made, which address these latency issues
0027 for thin streams. In short, if the kernel detects a thin stream,
0028 the retransmission mechanisms are modified in the following manner:
0029 
0030 1) If the stream is thin, fast retransmit on the first dupACK.
0031 2) If the stream is thin, do not apply exponential backoff.
0032 
0033 These enhancements are applied only if the stream is detected as
0034 thin. This is accomplished by defining a threshold for the number
0035 of packets in flight. If there are less than 4 packets in flight,
0036 fast retransmissions can not be triggered, and the stream is prone
0037 to experience high retransmission latencies.
0038 
0039 Since these mechanisms are targeted at time-dependent applications,
0040 they must be specifically activated by the application using the
0041 TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the
0042 tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both
0043 modifications are turned off by default.
0044 
0045 References
0046 ==========
0047 More information on the modifications, as well as a wide range of
0048 experimental data can be found here:
0049 
0050 "Improving latency for interactive, thin-stream applications over
0051 reliable transport"
0052 http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file