Commit 572be9bf authored by Eric Dumazet's avatar Eric Dumazet Committed by Jakub Kicinski
Browse files

tcp: increase tcp_rmem[2] to 32 MB



Last change to tcp_rmem[2] happened in 2012, in commit b49960a0
("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: default avatarEric Dumazet <edumazet@google.com>
Link: https://patch.msgid.link/20250513193919.1089692-12-edumazet@google.com


Signed-off-by: default avatarJakub Kicinski <kuba@kernel.org>
parent c4221a8c
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -735,7 +735,7 @@ tcp_rmem - vector of 3 INTEGERs: min, default, max
	net.core.rmem_max.  Calling setsockopt() with SO_RCVBUF disables
	automatic tuning of that socket's receive buffer size, in which
	case this value is ignored.
	Default: between 131072 and 6MB, depending on RAM size.
	Default: between 131072 and 32MB, depending on RAM size.

tcp_sack - BOOLEAN
	Enable select acknowledgments (SACKS).
+1 −1
Original line number Diff line number Diff line
@@ -5231,7 +5231,7 @@ void __init tcp_init(void)
	/* Set per-socket limits to no more than 1/128 the pressure threshold */
	limit = nr_free_buffer_pages() << (PAGE_SHIFT - 7);
	max_wshare = min(4UL*1024*1024, limit);
	max_rshare = min(6UL*1024*1024, limit);
	max_rshare = min(32UL*1024*1024, limit);

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