Home Home > GIT Browse
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:08:48 +0100
committerThomas Bogendoerfer <tbogendoerfer@suse.de>2019-11-05 14:09:56 +0100
commit8e80a5934fbdcd33cbebb8afc8900a673ed14a3f (patch)
treef0bc60b4050cc0291208a7645505272b0418b155
parent49568a995d7d15f1888181a8e0f7747789c22f93 (diff)
tcp: increase tcp_max_syn_backlog max value (bsc#1154353).
-rw-r--r--patches.suse/tcp-increase-tcp_max_syn_backlog-max-value.patch55
-rw-r--r--series.conf1
2 files changed, 56 insertions, 0 deletions
diff --git a/patches.suse/tcp-increase-tcp_max_syn_backlog-max-value.patch b/patches.suse/tcp-increase-tcp_max_syn_backlog-max-value.patch
new file mode 100644
index 0000000000..f39d9b94b8
--- /dev/null
+++ b/patches.suse/tcp-increase-tcp_max_syn_backlog-max-value.patch
@@ -0,0 +1,55 @@
+From: Eric Dumazet <edumazet@google.com>
+Date: Wed, 30 Oct 2019 10:05:46 -0700
+Subject: tcp: increase tcp_max_syn_backlog max value
+Patch-mainline: v5.4-rc6
+Git-commit: 623d0c2db02043e43b698fdd8de1bd398b8e7b37
+References: bsc#1154353
+
+tcp_max_syn_backlog default value depends on memory size
+and TCP ehash size. Before this patch, the max value
+was 2048 [1], which is considered too small nowadays.
+
+Increase it to 4096 to match the recent SOMAXCONN change.
+
+[1] This is with TCP ehash size being capped to 524288 buckets.
+
+Signed-off-by: Eric Dumazet <edumazet@google.com>
+Cc: Willy Tarreau <w@1wt.eu>
+Cc: Yue Cao <ycao009@ucr.edu>
+Signed-off-by: David S. Miller <davem@davemloft.net>
+Acked-by: Thomas Bogendoerfer <tbogendoerfer@suse.de>
+---
+ Documentation/networking/ip-sysctl.txt | 7 +++++--
+ net/ipv4/tcp_ipv4.c | 2 +-
+ 2 files changed, 6 insertions(+), 3 deletions(-)
+
+--- a/Documentation/networking/ip-sysctl.txt
++++ b/Documentation/networking/ip-sysctl.txt
+@@ -402,11 +402,14 @@ tcp_max_orphans - INTEGER
+ up to ~64K of unswappable memory.
+
+ tcp_max_syn_backlog - INTEGER
+- Maximal number of remembered connection requests, which have not
+- received an acknowledgment from connecting client.
++ Maximal number of remembered connection requests (SYN_RECV),
++ which have not received an acknowledgment from connecting client.
++ This is a per-listener limit.
+ The minimal value is 128 for low memory machines, and it will
+ increase in proportion to the memory of machine.
+ If server suffers from overload, try increasing this number.
++ Remember to also check /proc/sys/net/core/somaxconn
++ A SYN_RECV request socket consumes about 304 bytes of memory.
+
+ tcp_max_tw_buckets - INTEGER
+ Maximal number of timewait sockets held by system simultaneously.
+--- a/net/ipv4/tcp_ipv4.c
++++ b/net/ipv4/tcp_ipv4.c
+@@ -2676,7 +2676,7 @@ static int __net_init tcp_sk_init(struct
+ net->ipv4.tcp_death_row.sysctl_max_tw_buckets = cnt / 2;
+ net->ipv4.tcp_death_row.hashinfo = &tcp_hashinfo;
+
+- net->ipv4.sysctl_max_syn_backlog = max(128, cnt / 256);
++ net->ipv4.sysctl_max_syn_backlog = max(128, cnt / 128);
+ net->ipv4.sysctl_tcp_sack = 1;
+ net->ipv4.sysctl_tcp_window_scaling = 1;
+ net->ipv4.sysctl_tcp_timestamps = 1;
diff --git a/series.conf b/series.conf
index 56d65f0df4..92fab6cb58 100644
--- a/series.conf
+++ b/series.conf
@@ -2889,6 +2889,7 @@
patches.suse/net-annotate-lockless-accesses-to-sk-sk_napi_id.patch
patches.suse/cxgb4-fix-panic-when-attaching-to-ULD-fail.patch
patches.suse/netdevsim-Fix-use-after-free-during-device-dismantle.patch
+ patches.suse/tcp-increase-tcp_max_syn_backlog-max-value.patch
patches.suse/powerpc-powernv-Fix-CPU-idle-to-be-called-with-IRQs-.patch
patches.suse/scsi-qla2xxx-fixup-incorrect-usage-of-host_byte.patch
patches.suse/scsi-lpfc-Check-queue-pointer-before-use.patch