Skip to content

Commit 572be9b

Browse files
edumazetkuba-moo
authored andcommitted
tcp: increase tcp_rmem[2] to 32 MB
Last change to tcp_rmem[2] happened in 2012, in commit b49960a ("tcp: change tcp_adv_win_scale and tcp_rmem[2]") TCP performance on WAN is mostly limited by tcp_rmem[2] for receivers. After this series improvements, it is time to increase the default. Signed-off-by: Eric Dumazet <edumazet@google.com> Link: https://patch.msgid.link/20250513193919.1089692-12-edumazet@google.com Signed-off-by: Jakub Kicinski <kuba@kernel.org>
1 parent c4221a8 commit 572be9b

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

Documentation/networking/ip-sysctl.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -735,7 +735,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
735735
net.core.rmem_max. Calling setsockopt() with SO_RCVBUF disables
736736
automatic tuning of that socket's receive buffer size, in which
737737
case this value is ignored.
738-
Default: between 131072 and 6MB, depending on RAM size.
738+
Default: between 131072 and 32MB, depending on RAM size.
739739

740740
tcp_sack - BOOLEAN
741741
Enable select acknowledgments (SACKS).

net/ipv4/tcp.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5231,7 +5231,7 @@ void __init tcp_init(void)
52315231
/* Set per-socket limits to no more than 1/128 the pressure threshold */
52325232
limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
52335233
max_wshare = min(4UL*1024*1024, limit);
5234-
max_rshare = min(6UL*1024*1024, limit);
5234+
max_rshare = min(32UL*1024*1024, limit);
52355235

52365236
init_net.ipv4.sysctl_tcp_wmem[0] = PAGE_SIZE;
52375237
init_net.ipv4.sysctl_tcp_wmem[1] = 16*1024;

0 commit comments

Comments
 (0)