From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id 3115015815E for ; Fri, 2 Feb 2024 12:14:28 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 5550FE29E9; Fri, 2 Feb 2024 12:14:27 +0000 (UTC) Received: from smtp.gentoo.org (woodpecker.gentoo.org [140.211.166.183]) (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) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 310D7E29E9 for ; Fri, 2 Feb 2024 12:14:27 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (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) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 003EF3431D0 for ; Fri, 2 Feb 2024 12:14:26 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 3A707358 for ; Fri, 2 Feb 2024 12:14:24 +0000 (UTC) From: "Fabian Groffen" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Fabian Groffen" Message-ID: <1706875982.885a6df29cfa5e73483f33c05fef8dac3f7ec55a.grobian@gentoo> Subject: [gentoo-commits] repo/proj/prefix:master commit in: scripts/ X-VCS-Repository: repo/proj/prefix X-VCS-Files: scripts/bootstrap-prefix.sh X-VCS-Directories: scripts/ X-VCS-Committer: grobian X-VCS-Committer-Name: Fabian Groffen X-VCS-Revision: 885a6df29cfa5e73483f33c05fef8dac3f7ec55a X-VCS-Branch: master Date: Fri, 2 Feb 2024 12:14:24 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Auto-Response-Suppress: DR, RN, NRN, OOF, AutoReply X-Archives-Salt: 92a0c1c1-a579-40ab-acd8-1e7808de5ead X-Archives-Hash: 6fb9061c297964d68ae9268eca1c2219 commit: 885a6df29cfa5e73483f33c05fef8dac3f7ec55a Author: Fabian Groffen gentoo org> AuthorDate: Fri Feb 2 12:13:02 2024 +0000 Commit: Fabian Groffen gentoo org> CommitDate: Fri Feb 2 12:13:02 2024 +0000 URL: https://gitweb.gentoo.org/repo/proj/prefix.git/commit/?id=885a6df2 scripts/bootstrap-prefix: change CPU usage suggestion for modern hardware Previous cap of 8 was based on old T1/T2. Nowadays we can use more. Suggest something along the lines of 50-75% of available CPUs to stay on the modest side. The user can override this in any case. Closes: https://bugs.gentoo.org/923617 Signed-off-by: Fabian Groffen gentoo.org> scripts/bootstrap-prefix.sh | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/scripts/bootstrap-prefix.sh b/scripts/bootstrap-prefix.sh index 4622dc5d3e..5cb6d9f265 100755 --- a/scripts/bootstrap-prefix.sh +++ b/scripts/bootstrap-prefix.sh @@ -2565,12 +2565,9 @@ EOF esac # get rid of excess spaces (at least Solaris wc does) ncpu=$((ncpu + 0)) - # Suggest usage of 100% to 60% of the available CPUs in the range - # from 1 to 14. We limit to no more than 8, since we easily flood - # the bus on those heavy-core systems and only slow down in that - # case anyway. - local tcpu=$((ncpu / 2 + 1)) - [[ ${tcpu} -gt 8 ]] && tcpu=8 + # Suggest usage of 50% to 75% of the available CPUs + [[ ${tcpu} -eq 0 ]] && tcpu=1 + local tcpu=$((((ncpu * 3) + 1) / 4)) [[ -n ${USE_CPU_CORES} ]] && tcpu=${USE_CPU_CORES} cat << EOF