netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 00/11] tcp: receive side improvements
@ 2025-05-13 19:39 Eric Dumazet
  2025-05-13 19:39 ` [PATCH net-next 01/11] tcp: add tcp_rcvbuf_grow() tracepoint Eric Dumazet
                   ` (13 more replies)
  0 siblings, 14 replies; 25+ messages in thread
From: Eric Dumazet @ 2025-05-13 19:39 UTC (permalink / raw)
  To: David S . Miller, Jakub Kicinski, Paolo Abeni, Neal Cardwell
  Cc: Simon Horman, Kuniyuki Iwashima, Rick Jones, Wei Wang, netdev,
	eric.dumazet, Eric Dumazet

We have set tcp_rmem[2] to 15 MB for about 8 years at Google,
but had some issues for high speed flows on very small RTT.

TCP rx autotuning has a tendency to overestimate the RTT,
thus tp->rcvq_space.space and sk->sk_rcvbuf.

This makes TCP receive queues much bigger than necessary,
to a point cpu caches are evicted before application can
copy the data, on cpus using DDIO.

This series aims to fix this.

- First patch adds tcp_rcvbuf_grow() tracepoint, which was very
  convenient to study the various issues fixed in this series.

- Seven patches fix receiver autotune issues.

- Two patches fix sender side issues.

- Final patch increases tcp_rmem[2] so that TCP speed over WAN
  can meet modern needs.

Tested on a 200Gbit NIC, average max throughput of a single flow:

Before:
 73593 Mbit.

After:
 122514 Mbit.

Eric Dumazet (11):
  tcp: add tcp_rcvbuf_grow() tracepoint
  tcp: fix sk_rcvbuf overshoot
  tcp: adjust rcvbuf in presence of reorders
  tcp: add receive queue awareness in tcp_rcv_space_adjust()
  tcp: remove zero TCP TS samples for autotuning
  tcp: fix initial tp->rcvq_space.space value for passive TS enabled
    flows
  tcp: always seek for minimal rtt in tcp_rcv_rtt_update()
  tcp: skip big rtt sample if receive queue is not empty
  tcp: increase tcp_limit_output_bytes default value to 4MB
  tcp: always use tcp_limit_output_bytes limitation
  tcp: increase tcp_rmem[2] to 32 MB

 Documentation/networking/ip-sysctl.rst |   4 +-
 include/linux/tcp.h                    |   2 +-
 include/trace/events/tcp.h             |  73 ++++++++++++++++
 net/ipv4/tcp.c                         |   2 +-
 net/ipv4/tcp_input.c                   | 110 ++++++++++++-------------
 net/ipv4/tcp_ipv4.c                    |   4 +-
 net/ipv4/tcp_output.c                  |   5 +-
 7 files changed, 134 insertions(+), 66 deletions(-)

-- 
2.49.0.1045.g170613ef41-goog


^ permalink raw reply	[flat|nested] 25+ messages in thread

end of thread, other threads:[~2025-05-22 14:24 UTC | newest]

Thread overview: 25+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-13 19:39 [PATCH net-next 00/11] tcp: receive side improvements Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 01/11] tcp: add tcp_rcvbuf_grow() tracepoint Eric Dumazet
2025-05-14 15:30   ` David Ahern
2025-05-14 15:38     ` Eric Dumazet
2025-05-14 15:46       ` David Ahern
2025-05-14 16:33         ` Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 02/11] tcp: fix sk_rcvbuf overshoot Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 03/11] tcp: adjust rcvbuf in presence of reorders Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 04/11] tcp: add receive queue awareness in tcp_rcv_space_adjust() Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 05/11] tcp: remove zero TCP TS samples for autotuning Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 06/11] tcp: fix initial tp->rcvq_space.space value for passive TS enabled flows Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 07/11] tcp: always seek for minimal rtt in tcp_rcv_rtt_update() Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 08/11] tcp: skip big rtt sample if receive queue is not empty Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 09/11] tcp: increase tcp_limit_output_bytes default value to 4MB Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 10/11] tcp: always use tcp_limit_output_bytes limitation Eric Dumazet
2025-05-13 19:39 ` [PATCH net-next 11/11] tcp: increase tcp_rmem[2] to 32 MB Eric Dumazet
2025-05-14 20:24   ` Jakub Kicinski
2025-05-14 20:53     ` Kuniyuki Iwashima
2025-05-14 21:20       ` Kuniyuki Iwashima
2025-05-14 21:26         ` Jakub Kicinski
2025-05-14 21:28           ` Kuniyuki Iwashima
2025-05-14 20:26 ` [PATCH net-next 00/11] tcp: receive side improvements Jakub Kicinski
2025-05-15 18:50 ` patchwork-bot+netdevbpf
2025-05-22 14:03 ` Daniel Borkmann
2025-05-22 14:11   ` Eric Dumazet

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).