From: Paolo Abeni <pabeni@redhat.com>
To: Eric Dumazet <edumazet@google.com>,
"David S . Miller" <davem@davemloft.net>,
Jakub Kicinski <kuba@kernel.org>
Cc: Simon Horman <horms@kernel.org>,
Neal Cardwell <ncardwell@google.com>,
Kuniyuki Iwashima <kuniyu@google.com>,
netdev@vger.kernel.org, eric.dumazet@gmail.com
Subject: Re: [PATCH net-next 2/2] tcp: add net.ipv4.tcp_rtt_threshold sysctl
Date: Tue, 18 Nov 2025 22:14:56 +0100 [thread overview]
Message-ID: <c1a44dde-376c-4140-8f51-aeac0a49c0da@redhat.com> (raw)
In-Reply-To: <20251117132802.2083206-3-edumazet@google.com>
Hi,
On 11/17/25 2:28 PM, Eric Dumazet wrote:
> This is a follow up of commit aa251c84636c ("tcp: fix too slow
> tcp_rcvbuf_grow() action") which brought again the issue that I tried
> to fix in commit 65c5287892e9 ("tcp: fix sk_rcvbuf overshoot")
>
> We also recently increased tcp_rmem[2] to 32 MB in commit 572be9bf9d0d
> ("tcp: increase tcp_rmem[2] to 32 MB")
>
> Idea of this patch is to not let tcp_rcvbuf_grow() grow sk->sk_rcvbuf
> too fast for small RTT flows. If sk->sk_rcvbuf is too big, this can
> force NIC driver to not recycle pages from the page pool, and also
> can cause cache evictions for DDIO enabled cpus/NIC, as receivers
> are usually slower than senders.
>
> Add net.ipv4.tcp_rtt_threshold sysctl, set by default to 1000 usec (1 ms)
> If RTT if smaller than the sysctl value, use the RTT/tcp_rtt_threshold
> ratio to control sk_rcvbuf inflation.
>
> Signed-off-by: Eric Dumazet <edumazet@google.com>
I gave this series a spin in my test-bed: 2 quite old hosts b2b
connected via 100Gbps links. RTT is < 100us. Doing bulk/iperf3 tcp
transfers, with irq and user-space processes pinned.
The average tput for 30s connections does not change measurably: ~23Gbps
per connection. WRT the receiver buffer, in 30 runs prior to this patch
I see:
min 1901769, max 4322922 avg 2900036
On top of this series:
min 1078047 max 3967327 avg 2465665.
So I do see smaller buffers on average, but I'm not sure I'm hitting the
reference scenario (notably the lowest value here is considerably
higher than the theoretical minimum rcvwin required to handle the given
B/W).
Should I go for longer (or shorter) connections?
Thanks,
Paolo
next prev parent reply other threads:[~2025-11-18 21:15 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-11-17 13:28 [PATCH net-next 0/2] tcp: tcp_rcvbuf_grow() changes Eric Dumazet
2025-11-17 13:28 ` [PATCH net-next 1/2] tcp: tcp_moderate_rcvbuf is only used in rx path Eric Dumazet
2025-11-18 4:13 ` Kuniyuki Iwashima
2025-11-17 13:28 ` [PATCH net-next 2/2] tcp: add net.ipv4.tcp_rtt_threshold sysctl Eric Dumazet
2025-11-18 4:39 ` Kuniyuki Iwashima
2025-11-18 14:04 ` Neal Cardwell
2025-11-18 16:10 ` Eric Dumazet
2025-11-18 21:14 ` Paolo Abeni [this message]
2025-11-18 21:22 ` Eric Dumazet
2025-11-19 8:01 ` Eric Dumazet
2025-11-19 8:59 ` Paolo Abeni
2025-11-19 9:07 ` Eric Dumazet
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=c1a44dde-376c-4140-8f51-aeac0a49c0da@redhat.com \
--to=pabeni@redhat.com \
--cc=davem@davemloft.net \
--cc=edumazet@google.com \
--cc=eric.dumazet@gmail.com \
--cc=horms@kernel.org \
--cc=kuba@kernel.org \
--cc=kuniyu@google.com \
--cc=ncardwell@google.com \
--cc=netdev@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.