From 1faecf19a86dbb29b62607b1740ef59a5c35acb2 Mon Sep 17 00:00:00 2001 From: Markus Boehme Date: Tue, 23 May 2023 17:16:44 +0000 Subject: [PATCH] af_unix: increase default max_dgram_qlen to 512 The net.unix.max_dgram_qlen sysctl has been defined with a default value of 10 since before the current Git history started in 2005. Systems have more resources these days, and while the default values for other sysctls like net.core.somaxconn have been adapted, max_dgram_qlen never was. Increase the default value for max_dgram_qlen to 512. A large number of hosts effectively already run with this or a larger value, since systemd has been making sure it is set to at least 512 since 2015. Signed-off-by: Markus Boehme --- Documentation/networking/ip-sysctl.rst | 2 +- net/unix/af_unix.c | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/Documentation/networking/ip-sysctl.rst b/Documentation/networking/ip-sysctl.rst index e7b3fa7bb..f20837a92 100644 --- a/Documentation/networking/ip-sysctl.rst +++ b/Documentation/networking/ip-sysctl.rst @@ -3038,5 +3038,5 @@ ecn_enable - BOOLEAN max_dgram_qlen - INTEGER The maximum length of dgram socket receive queue - Default: 10 + Default: 512 diff --git a/net/unix/af_unix.c b/net/unix/af_unix.c index f0c2293f1..3962a66c5 100644 --- a/net/unix/af_unix.c +++ b/net/unix/af_unix.c @@ -3600,7 +3600,7 @@ static int __net_init unix_net_init(struct net *net) { int i; - net->unx.sysctl_max_dgram_qlen = 10; + net->unx.sysctl_max_dgram_qlen = 512; if (unix_sysctl_register(net)) goto out; -- 2.40.0