]> git.ipfire.org Git - people/ms/ipfire-2.x.git/commitdiff
make.sh: Set parallelism to number of CPU cores
authorMichael Tremer <michael.tremer@ipfire.org>
Fri, 26 Feb 2021 18:17:03 +0000 (18:17 +0000)
committerMichael Tremer <michael.tremer@ipfire.org>
Thu, 15 Apr 2021 14:05:52 +0000 (14:05 +0000)
Setting it to something higher than the number of physical CPU cores was
a good idea when we used to have slow magnetic storage. That way, at
least there was always one process waiting for IO.

With modern fast flash-based storage, this does not hold any more since
it is fast enough that we don't need to have a couple of processes ready
to wait.

It will probably have made work for the scheduler more challenging since
more processes were ready and processes were moved around processors.

Signed-off-by: Michael Tremer <michael.tremer@ipfire.org>
make.sh

diff --git a/make.sh b/make.sh
index fe76657e0b555e6cb79cc33eac13e59eabe94f75..3658157b422f774cdbc83cef170037210927a0a9 100755 (executable)
--- a/make.sh
+++ b/make.sh
@@ -149,7 +149,7 @@ configure_build() {
        # 128MB of memory. Therefore we find out how
        # many processes fit into memory.
        local mem_max=$(( ${SYSTEM_MEMORY} / 128 ))
-       local cpu_max=$(( ${SYSTEM_PROCESSORS} + 1 ))
+       local cpu_max=$(( ${SYSTEM_PROCESSORS} ))
 
        local parallelism
        if [ ${mem_max} -lt ${cpu_max} ]; then