tcp-thin.rst 2.3 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152
  1. .. SPDX-License-Identifier: GPL-2.0
  2. ====================
  3. Thin-streams and TCP
  4. ====================
  5. A wide range of Internet-based services that use reliable transport
  6. protocols display what we call thin-stream properties. This means
  7. that the application sends data with such a low rate that the
  8. retransmission mechanisms of the transport protocol are not fully
  9. effective. In time-dependent scenarios (like online games, control
  10. systems, stock trading etc.) where the user experience depends
  11. on the data delivery latency, packet loss can be devastating for
  12. the service quality. Extreme latencies are caused by TCP's
  13. dependency on the arrival of new data from the application to trigger
  14. retransmissions effectively through fast retransmit instead of
  15. waiting for long timeouts.
  16. After analysing a large number of time-dependent interactive
  17. applications, we have seen that they often produce thin streams
  18. and also stay with this traffic pattern throughout its entire
  19. lifespan. The combination of time-dependency and the fact that the
  20. streams provoke high latencies when using TCP is unfortunate.
  21. In order to reduce application-layer latency when packets are lost,
  22. a set of mechanisms has been made, which address these latency issues
  23. for thin streams. In short, if the kernel detects a thin stream,
  24. the retransmission mechanisms are modified in the following manner:
  25. 1) If the stream is thin, fast retransmit on the first dupACK.
  26. 2) If the stream is thin, do not apply exponential backoff.
  27. These enhancements are applied only if the stream is detected as
  28. thin. This is accomplished by defining a threshold for the number
  29. of packets in flight. If there are less than 4 packets in flight,
  30. fast retransmissions can not be triggered, and the stream is prone
  31. to experience high retransmission latencies.
  32. Since these mechanisms are targeted at time-dependent applications,
  33. they must be specifically activated by the application using the
  34. TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the
  35. tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both
  36. modifications are turned off by default.
  37. References
  38. ==========
  39. More information on the modifications, as well as a wide range of
  40. experimental data can be found here:
  41. "Improving latency for interactive, thin-stream applications over
  42. reliable transport"
  43. http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file