1
0
mirror of https://github.com/home-assistant/operating-system.git synced 2025-12-19 18:08:29 +00:00

sysctl: Enable linear RTO for thin TCP streams (#4238)

Set net.ipv4.tcp_thin_linear_timeouts=1 to switch retransmission
timeout (RTO) backoff from exponential to linear for 'thin' TCP flows.
This reduces tail latency for API-style connections that typically have
very few packets in flight, improving recovery from sporadic loss without
changing anything for larger TCP transfers.

Kernel definition: A flow is considered thin when 'tp->packets_out < 4'
and while not in the initial slow start.

See tcp_stream_is_thin(tp) in include/net/tcp.h.
This commit is contained in:
@RubenKelevra
2025-08-26 19:23:14 +02:00
committed by GitHub
parent 22fe9b19ee
commit 870baa96be

View File

@@ -5,3 +5,9 @@ net.ipv4.igmp_max_memberships = 1024
# Increase maximum receive and send buffer size
net.core.rmem_max = 4194304
net.core.wmem_max = 4194304
# Enable linear RTO backoff for "thin" TCP streams.
# "Thin" per kernel: tp->packets_out < 4 and not in initial slow start.
# Ref: tcp_stream_is_thin(tp) in include/net/tcp.h
# Rationale: reduce tail latency for API-style connections after sporadic loss.
net.ipv4.tcp_thin_linear_timeouts = 1