Skip to content

tcp: receive side improvements

Eric Dumazet bpf netdev 1 version Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest11 patches 12 repliesApplied 11/11

Patches in v1 All 11 applied

#Subject and filesSizeRepliesApplied
1/11tcp: add tcp_rcvbuf_grow() tracepointinclude/trace/events/tcp.h net/ipv4/tcp_input.c+75 -04 repliesApplied
2/11tcp: fix sk_rcvbuf overshootnet/ipv4/tcp_input.c+25 -340 repliesApplied
3/11tcp: adjust rcvbuf in presence of reordersnet/ipv4/tcp_input.c+4 -00 repliesApplied
4/11tcp: add receive queue awareness in tcp_rcv_space_adjust()include/linux/tcp.h net/ipv4/tcp_input.c+5 -30 repliesApplied
5/11tcp: remove zero TCP TS samples for autotuningnet/ipv4/tcp_input.c+5 -50 repliesApplied
6/11tcp: fix initial tp->rcvq_space.space value for passive TS enabled flowsnet/ipv4/tcp_input.c+3 -30 repliesApplied
7/11tcp: always seek for minimal rtt in tcp_rcv_rtt_update()net/ipv4/tcp_input.c+8 -140 repliesApplied
8/11tcp: skip big rtt sample if receive queue is not emptynet/ipv4/tcp_input.c+3 -00 repliesApplied
9/11tcp: increase tcp_limit_output_bytes default value to 4MBDocumentation/networking/ip-sysctl.rst net/ipv4/tcp_ipv4.c+3 -30 repliesApplied
10/11tcp: always use tcp_limit_output_bytes limitationnet/ipv4/tcp_output.c+2 -30 repliesApplied
11/11tcp: increase tcp_rmem[2] to 32 MBDocumentation/networking/ip-sysctl.rst net/ipv4/tcp.c+2 -25 repliesApplied

Reviews trailers per patch

4 of 11 patches have a Reviewed-by or Acked-by.

PatchWei WangNeal Cardwell
1/11R-b R-b
2/11
3/11
4/11R-b
5/11R-b
6/11R-b
7/11
8/11
9/11
10/11
11/11

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 00/11] tcp: receive side improvements

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(-)
Signature · 1 line
2.49.0.1045.g170613ef41-goog