Skip to content

Commit 885a6df

Browse files
committed
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 <[email protected]>
1 parent 377f6f4 commit 885a6df

File tree

1 file changed

+3
-6
lines changed

1 file changed

+3
-6
lines changed

scripts/bootstrap-prefix.sh

+3-6
Original file line numberDiff line numberDiff line change
@@ -2565,12 +2565,9 @@ EOF
25652565
esac
25662566
# get rid of excess spaces (at least Solaris wc does)
25672567
ncpu=$((ncpu + 0))
2568-
# Suggest usage of 100% to 60% of the available CPUs in the range
2569-
# from 1 to 14. We limit to no more than 8, since we easily flood
2570-
# the bus on those heavy-core systems and only slow down in that
2571-
# case anyway.
2572-
local tcpu=$((ncpu / 2 + 1))
2573-
[[ ${tcpu} -gt 8 ]] && tcpu=8
2568+
# Suggest usage of 50% to 75% of the available CPUs
2569+
[[ ${tcpu} -eq 0 ]] && tcpu=1
2570+
local tcpu=$((((ncpu * 3) + 1) / 4))
25742571
[[ -n ${USE_CPU_CORES} ]] && tcpu=${USE_CPU_CORES}
25752572
cat << EOF
25762573

0 commit comments

Comments
 (0)