[<prev] [next>] [<thread-prev] [day] [month] [year] [list]
Message-ID: <CADVnQyneLJrkGBotQdf_eqhOY2cGmN0mw1FEfPE+kd8mkQ3guA@mail.gmail.com>
Date: Thu, 6 Nov 2025 10:57:16 -0500
From: Neal Cardwell <ncardwell@...gle.com>
To: Eric Dumazet <edumazet@...gle.com>
Cc: "David S . Miller" <davem@...emloft.net>, Jakub Kicinski <kuba@...nel.org>,
Paolo Abeni <pabeni@...hat.com>, Simon Horman <horms@...nel.org>,
Kuniyuki Iwashima <kuniyu@...gle.com>, netdev@...r.kernel.org, eric.dumazet@...il.com
Subject: Re: [PATCH v2 net-next] tcp: add net.ipv4.tcp_comp_sack_rtt_percent
On Thu, Nov 6, 2025 at 6:52 AM Eric Dumazet <edumazet@...gle.com> wrote:
>
> TCP SACK compression has been added in 2018 in commit
> 5d9f4262b7ea ("tcp: add SACK compression").
>
> It is working great for WAN flows (with large RTT).
> Wifi in particular gets a significant boost _when_ ACK are suppressed.
>
> Add a new sysctl so that we can tune the very conservative 5 % value
> that has been used so far in this formula, so that small RTT flows
> can benefit from this feature.
>
> delay = min ( 5 % of RTT, 1 ms)
>
> This patch adds new tcp_comp_sack_rtt_percent sysctl
> to ease experiments and tuning.
>
> Given that we cap the delay to 1ms (tcp_comp_sack_delay_ns sysctl),
> set the default value to 33 %.
>
> Quoting Neal Cardwell ( https://lore.kernel.org/netdev/CADVnQymZ1tFnEA1Q=vtECs0=Db7zHQ8=+WCQtnhHFVbEOzjVnQ@mail.gmail.com/ )
>
> The rationale for 33% is basically to try to facilitate pipelining,
> where there are always at least 3 ACKs and 3 GSO/TSO skbs per SRTT, so
> that the path can maintain a budget for 3 full-sized GSO/TSO skbs "in
> flight" at all times:
>
> + 1 skb in the qdisc waiting to be sent by the NIC next
> + 1 skb being sent by the NIC (being serialized by the NIC out onto the wire)
> + 1 skb being received and aggregated by the receiver machine's
> aggregation mechanism (some combination of LRO, GRO, and sack
> compression)
>
> Note that this is basically the same magic number (3) and the same
> rationales as:
>
> (a) tcp_tso_should_defer() ensuring that we defer sending data for no
> longer than cwnd/tcp_tso_win_divisor (where tcp_tso_win_divisor = 3),
> and
> (b) bbr_quantization_budget() ensuring that cwnd is at least 3 GSO/TSO
> skbs to maintain pipelining and full throughput at low RTTs
>
> Signed-off-by: Eric Dumazet <edumazet@...gle.com>
> ---
> v2: changed default to 33% (instead of 100% in v1)
> v1: https://lore.kernel.org/netdev/CANn89iJpinbbrU2YxiWNQa9b2vQ035A75g00hWFLce-CAJi9hA@mail.gmail.com/T/#m5047025977aaddcd2c1b2ed0117fd2177898fa87
Reviewed-by: Neal Cardwell <ncardwell@...gle.com>
Thanks, Eric!
neal
Powered by blists - more mailing lists