From nobody Thu Feb 06 15:07:47 2025 X-Original-To: bugs@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4YpgSz5Jc8z5mZZl for ; Thu, 06 Feb 2025 15:07:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R11" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4YpgSz0gsTz3vrB for ; Thu, 06 Feb 2025 15:07:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738854467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqnhBA41etTmwdnu1SNdpe5zxr+jA4yfoPx+/U/osoU=; b=mWw1F/153R+zT+zrhzL7ORIiCRJbb/UCnK6Na1lnGcGKEM7K8FLM1GTxeC3mjUKIG0zeEO 2gxjlpu0kBEkfQkTwBbU3Vr4x8aKcxZEyD8k4UbVLgiNKJYnwJoOtAvTydq21C03d3wFde gLexTepVz249trOIjPEA7DhNlHIs/maZUHG6mGznMuju+wa10Wv7/SEi8AfmSYAqsBEVs1 LscNQXQ0m8JHLCQji4Ksms7uFTG1Rk3UvQP20JWoUI+yWXk9PWgAii80h5YwoV0ERsuQez DuMBytEPtCkFpjFIr5M350e6B4TSTeAVOWyNw0k4+aQrnhwjpVO13ct+Y+yo7w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1738854467; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=dqnhBA41etTmwdnu1SNdpe5zxr+jA4yfoPx+/U/osoU=; b=N4aSsIn2pSRy+aY5l2+l+7bbY8gTMncw/cA/R5DiL5MV8RfL9GtzkxYu8ra29/JOamKp07 mLgCbYG3qUGehsRnLrIUd50hYzj0+dh7k0Fd1BFcTGcGpT8AMV5DSOFbVj4zBkExQ9oZve jrRZsqZKnvvsNOrdFOLKNKlYdP2tNBred54/8xo1XZBHvkvcROu/JaUNQXNAhVwhFoI3mD sYuNsSb2TfS7L1datNtEWaxGrgGu0VUuoD7+6SfWh59Lcn/u90MOsJQwJiES9meU9RteKz KSLPbxYRnqJV1+g9MgHWmKbX9AnZzKhLsWOif4pl48I0DoJtTkWPJbb305+pMg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1738854467; a=rsa-sha256; cv=none; b=eONAkFlxxbHtUZfjrhlqJvSROkyBTJIYfRwTO2UZSIdSIAP6Y5T56pGyTER1AXBWLy+rtr aNUYds6U43P/rNfnZlhhFaBsp1WknOhpS/S4bNeGP/tTkeoOgGu8dPwklq4yyzhkzlXsOG IpTE0Xqi1SwnvbXMLFW4U+/U3/EC6ic2Y65xtHeDb7eajCqciW4TDQJt4vrCUh4z4hoxZw Vf0q54tCYvvWPRQb8OThS0f/SGT8Xqy/KkEYX2WQvrDlY7NnjXLBf6P3yDfUSfkJXRBD3k PmP2ccH+uAI1g0Yv/fKNuiWt2E3oC3i9d/Io0uQRp1eT5BxWWtRwpHaHnwPTcg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2610:1c1:1:606c::50:1d]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4YpgSz0Cj1zkBV for ; Thu, 06 Feb 2025 15:07:47 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org ([127.0.1.5]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id 516F7klk079489 for ; Thu, 6 Feb 2025 15:07:46 GMT (envelope-from bugzilla-noreply@freebsd.org) Received: (from www@localhost) by kenobi.freebsd.org (8.15.2/8.15.2/Submit) id 516F7ki7079488 for bugs@FreeBSD.org; Thu, 6 Feb 2025 15:07:46 GMT (envelope-from bugzilla-noreply@freebsd.org) X-Authentication-Warning: kenobi.freebsd.org: www set sender to bugzilla-noreply@freebsd.org using -f From: bugzilla-noreply@freebsd.org To: bugs@FreeBSD.org Subject: [Bug 284616] nfsd thread count auto-tune do not respect MAXNFSDCNT Date: Thu, 06 Feb 2025 15:07:47 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: new X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: kern X-Bugzilla-Version: 14.2-STABLE X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Some People X-Bugzilla-Who: florian.millet@laposte.net X-Bugzilla-Status: New X-Bugzilla-Resolution: X-Bugzilla-Priority: --- X-Bugzilla-Assigned-To: bugs@FreeBSD.org X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: bug_id short_desc product version rep_platform op_sys bug_status bug_severity priority component assigned_to reporter Message-ID: Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="UTF-8" X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated List-Id: Bug reports List-Archive: https://lists.freebsd.org/archives/freebsd-bugs List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-bugs@FreeBSD.org MIME-Version: 1.0 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D284616 Bug ID: 284616 Summary: nfsd thread count auto-tune do not respect MAXNFSDCNT Product: Base System Version: 14.2-STABLE Hardware: Any OS: Any Status: New Severity: Affects Some People Priority: --- Component: kern Assignee: bugs@FreeBSD.org Reporter: florian.millet@laposte.net Hello everyone, When launching nfsd without the -n parameter a function called get_tuned_nfsdcount set the number of threads to launch at start to (number= of cpu * 8) but do not check if this result is greater than MAXNFSDCNT (which = is 256). On a processor with 72 cores it makes nfsd launch 576 threads per nfsd, if = you have multiple nfsd (with jails for example) it grows very quickly. This problem do not appear if you manually set the number of threads through the -n command line parameter to nfsd. It would seem this regression appeared in commit ae3e3df45c75ba60ec2cd2d425e4921bf2a6321d (or SVN revision 282272) nearly 10 years ago. A patch like this one should be enough to restore this check : diff --git a/usr.sbin/nfsd/nfsd.c b/usr.sbin/nfsd/nfsd.c index c1995580e142..cb506a4b1740 100644 --- a/usr.sbin/nfsd/nfsd.c +++ b/usr.sbin/nfsd/nfsd.c @@ -1033,6 +1033,8 @@ get_tuned_nfsdcount(void) tuned_nfsdcnt =3D DEFNFSDCNT; } else { tuned_nfsdcnt =3D ncpu * 8; + if (tuned_nfsdcnt > MAXNFSDCNT) + tuned_nfsdcnt =3D MAXNFSDCNT; } return tuned_nfsdcnt; } --=20 You are receiving this mail because: You are the assignee for the bug.=