요약·해설과 원문, 전문 번역을 서로 분리했습니다. API 이름, symbol, source path는 원문 표기를 사용합니다.
1. 요약·해설
원문의 핵심 논리와 kernel programming 관점의 보충 설명입니다. 아래의 전문 번역과는 별도로 작성했습니다.
2. 영어 원문 전체
번역 기준이 된 Linux v6.18.37 원문입니다. 줄 번호는 이 버전의 파일 좌표입니다.
원문 전체 펼치기
.. SPDX-License-Identifier: GPL-2.0
====================
Thin-streams and TCP
====================
A wide range of Internet-based services that use reliable transport
protocols display what we call thin-stream properties. This means
that the application sends data with such a low rate that the
retransmission mechanisms of the transport protocol are not fully
effective. In time-dependent scenarios (like online games, control
systems, stock trading etc.) where the user experience depends
on the data delivery latency, packet loss can be devastating for
the service quality. Extreme latencies are caused by TCP's
dependency on the arrival of new data from the application to trigger
retransmissions effectively through fast retransmit instead of
waiting for long timeouts.
After analysing a large number of time-dependent interactive
applications, we have seen that they often produce thin streams
and also stay with this traffic pattern throughout its entire
lifespan. The combination of time-dependency and the fact that the
streams provoke high latencies when using TCP is unfortunate.
In order to reduce application-layer latency when packets are lost,
a set of mechanisms has been made, which address these latency issues
for thin streams. In short, if the kernel detects a thin stream,
the retransmission mechanisms are modified in the following manner:
1) If the stream is thin, fast retransmit on the first dupACK.
2) If the stream is thin, do not apply exponential backoff.
These enhancements are applied only if the stream is detected as
thin. This is accomplished by defining a threshold for the number
of packets in flight. If there are less than 4 packets in flight,
fast retransmissions can not be triggered, and the stream is prone
to experience high retransmission latencies.
Since these mechanisms are targeted at time-dependent applications,
they must be specifically activated by the application using the
TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the
tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both
modifications are turned off by default.
References
==========
More information on the modifications, as well as a wide range of
experimental data can be found here:
"Improving latency for interactive, thin-stream applications over
reliable transport"
http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file
3. 한국어 전문 번역
영어 원문의 문단 순서와 의미를 유지한 전체 번역입니다. 코드, 함수명, symbol과 URL은 원문 표기를 유지합니다.
문서 제목
1-6이 문서는 GPL-2.0 라이선스를 따르며 TCP에서 thin stream이 겪는 latency 문제를 설명합니다.
.. SPDX-License-Identifier: GPL-2.0
====================
Thin-streams and TCP
====================
낮은 전송률과 retransmission latency
7-24Reliable transport protocol을 사용하는 다양한 Internet service에는 thin-stream 특성이 나타납니다. Application의 data 전송률이 매우 낮아 transport protocol의 retransmission mechanism이 충분히 효과적으로 작동하지 않는 traffic입니다.
Online game, control system, stock trading처럼 사용자 경험이 data delivery latency에 의존하는 시간 민감 환경에서는 packet loss가 service 품질에 치명적입니다. TCP가 긴 timeout을 기다리지 않고 fast retransmit을 효과적으로 일으키려면 application에서 새 data가 도착해야 하는데, thin stream에서는 그 data가 드물어 극단적인 latency가 생깁니다.
많은 시간 민감 interactive application을 분석한 결과, 이들은 thin stream을 자주 만들며 전체 수명 동안 같은 traffic pattern을 유지하기도 합니다. 시간 민감성과 TCP thin stream의 높은 latency가 결합되는 것이 문제입니다.
새 data가 적어 dupACK 축적과 fast retransmit이 늦어집니다.
A wide range of Internet-based services that use reliable transport
protocols display what we call thin-stream properties. This means
that the application sends data with such a low rate that the
retransmission mechanisms of the transport protocol are not fully
effective. In time-dependent scenarios (like online games, control
systems, stock trading etc.) where the user experience depends
on the data delivery latency, packet loss can be devastating for
the service quality. Extreme latencies are caused by TCP's
dependency on the arrival of new data from the application to trigger
retransmissions effectively through fast retransmit instead of
waiting for long timeouts.
After analysing a large number of time-dependent interactive
applications, we have seen that they often produce thin streams
and also stay with this traffic pattern throughout its entire
lifespan. The combination of time-dependency and the fact that the
streams provoke high latencies when using TCP is unfortunate.
Thin stream용 retransmission 변경
25-43Packet loss 때 application-layer latency를 줄이기 위해 thin stream 전용 mechanism을 만들었습니다. Kernel이 thin stream을 감지하면 retransmission 동작을 다음과 같이 바꿉니다.
1. Stream이 thin이면 첫 번째 duplicate ACK에서 fast retransmit을 수행합니다.
2. Stream이 thin이면 exponential backoff를 적용하지 않습니다.
이 향상 기능은 stream이 thin으로 판정될 때만 적용됩니다. 판정 기준은 in-flight packet 수이며 4개보다 적으면 일반 fast retransmission을 유발하기 어렵고 높은 retransmission latency를 겪기 쉽습니다.
이 mechanism은 시간 민감 application용이므로 application이 `TCP_THIN_LINEAR_TIMEOUTS`와 `TCP_THIN_DUPACK` socket option 또는 `tcp_thin_linear_timeouts`와 `tcp_thin_dupack` sysctl로 명시적으로 활성화해야 합니다. 두 변경은 기본적으로 꺼져 있습니다.
조건·동작·활성화 수단을 구분합니다.
In order to reduce application-layer latency when packets are lost,
a set of mechanisms has been made, which address these latency issues
for thin streams. In short, if the kernel detects a thin stream,
the retransmission mechanisms are modified in the following manner:
1) If the stream is thin, fast retransmit on the first dupACK.
2) If the stream is thin, do not apply exponential backoff.
These enhancements are applied only if the stream is detected as
thin. This is accomplished by defining a threshold for the number
of packets in flight. If there are less than 4 packets in flight,
fast retransmissions can not be triggered, and the stream is prone
to experience high retransmission latencies.
Since these mechanisms are targeted at time-dependent applications,
they must be specifically activated by the application using the
TCP_THIN_LINEAR_TIMEOUTS and TCP_THIN_DUPACK IOCTLS or the
tcp_thin_linear_timeouts and tcp_thin_dupack sysctls. Both
modifications are turned off by default.
참고 자료
44-52변경 사항의 세부 내용과 다양한 실험 data는 ‘Improving latency for interactive, thin-stream applications over reliable transport’ 자료에서 확인할 수 있습니다. 원문 URL을 그대로 보존합니다.
References
==========
More information on the modifications, as well as a wide range of
experimental data can be found here:
"Improving latency for interactive, thin-stream applications over
reliable transport"
http://simula.no/research/nd/publications/Simula.nd.477/simula_pdf_file
요약·해설
tcp-thin.rst:1-52Thin stream은 in-flight packet이 적어 loss 뒤 fast retransmit에 필요한 dupACK을 모으기 어렵습니다. Linux는 4개 미만을 thin으로 보고 첫 dupACK retransmit과 linear timeout을 선택적으로 적용합니다.
성능 최적화가 아니라 시간 민감 application의 tail latency를 위한 예외 정책이므로 기본값은 꺼져 있으며 socket option이나 sysctl로 명시적으로 활성화해야 합니다.