Commit ca412f25 authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

tcp: reduce tcp_comp_sack_slack_ns default value to 10 usec



net.ipv4.tcp_comp_sack_slack_ns current default value is too high.

When a flow has many drops (1 % or more), and small RTT, adding 100 usec
before sending SACK stalls the sender relying on getting SACK
fast enough to keep the pipe busy.

Decrease the default to 10 usec.

This is orthogonal to Congestion Control heuristics to determine
if drops are caused by congestion or not.

Signed-off-by: default avatarEric Dumazet <edumazet@google.com>
Reviewed-by: default avatarNeal Cardwell <ncardwell@google.com>
Link: https://patch.msgid.link/20251114135141.3810964-1-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent 5860bb1c
Loading
Loading
Loading
Loading
+2 −1
Original line number Diff line number Diff line
@@ -875,8 +875,9 @@ tcp_comp_sack_slack_ns - LONG INTEGER
	timer used by SACK compression. This gives extra time
	for small RTT flows, and reduces system overhead by allowing
	opportunistic reduction of timer interrupts.
	Too big values might reduce goodput.

	Default : 100,000 ns (100 us)
	Default : 10,000 ns (10 us)

tcp_comp_sack_nr - INTEGER
	Max number of SACK that can be compressed.
+1 −1
Original line number Diff line number Diff line
@@ -3593,7 +3593,7 @@ static int __net_init tcp_sk_init(struct net *net)
		       sizeof(init_net.ipv4.sysctl_tcp_wmem));
	}
	net->ipv4.sysctl_tcp_comp_sack_delay_ns = NSEC_PER_MSEC;
	net->ipv4.sysctl_tcp_comp_sack_slack_ns = 100 * NSEC_PER_USEC;
	net->ipv4.sysctl_tcp_comp_sack_slack_ns = 10 * NSEC_PER_USEC;
	net->ipv4.sysctl_tcp_comp_sack_nr = 44;
	net->ipv4.sysctl_tcp_comp_sack_rtt_percent = 33;
	net->ipv4.sysctl_tcp_backlog_ack_defer = 1;