From: sthen Date: Wed, 13 Apr 2022 10:08:10 +0000 (+0000) Subject: Use a simpler "formula" to decide a default kern.maxthread value; X-Git-Url: http://artulab.com/gitweb/?a=commitdiff_plain;h=8458ad5d772e57b72cb636b6b463f8ad38873256;p=openbsd Use a simpler "formula" to decide a default kern.maxthread value; just 2*NPROCESS rather than NPROCESS+8*MAXUSERS. Results in a slightly higher maxthread value - the previous value was fairly likely to be exceeded on a system running a couple of heavily threaded processes. > previous new > MAXUSERS NPROCESS maxthread (2*NPROCESS) > 80 1310 1950 2620 > 64 1054 1566 2108 > 32 542 798 1084 ok kettenis@ --- diff --git a/sys/conf/param.c b/sys/conf/param.c index f5ea79cfd21..6a3cd398c55 100644 --- a/sys/conf/param.c +++ b/sys/conf/param.c @@ -1,4 +1,4 @@ -/* $OpenBSD: param.c,v 1.46 2021/01/13 16:28:50 cheloha Exp $ */ +/* $OpenBSD: param.c,v 1.47 2022/04/13 10:08:10 sthen Exp $ */ /* $NetBSD: param.c,v 1.16 1996/03/12 03:08:40 mrg Exp $ */ /* @@ -81,7 +81,7 @@ int utc_offset = 0; #define NVNODE (NPROCESS * 2 + NTEXT + 100) int initialvnodes = NVNODE; int maxprocess = NPROCESS; -int maxthread = NPROCESS + 8 * MAXUSERS; +int maxthread = 2 * NPROCESS; int maxfiles = 5 * (NPROCESS + MAXUSERS) + 80; long nmbclust = NMBCLUSTERS;