From d3f3daef654cdf0eb0edb1a7205d0491f0589f90 Mon Sep 17 00:00:00 2001 From: c-ewing <59128151+c-ewing@users.noreply.github.com> Date: Tue, 3 Dec 2024 19:49:29 -0800 Subject: [PATCH] Clarify check-cpu.sh documentation MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The original comment in the script incorrectly stated that it limits the number of cores used during the build process. In reality, the script calculates and limits the number of parallel jobs (make -j) based on available memory, which indirectly affects core usage. While limiting the number of jobs may reduce the number of cores utilized—if each job corresponds to one thread or core—this is not always guaranteed. This change clarifies the purpose of the script, communicating that it restricts the number of parallel build jobs to prevent resource contention, rather than directly controlling core usage. --- docker/check-cpu.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docker/check-cpu.sh b/docker/check-cpu.sh index b14c7afe89..956372c88f 100755 --- a/docker/check-cpu.sh +++ b/docker/check-cpu.sh @@ -1,7 +1,7 @@ #!/bin/sh # This script is used to check the amount of available memory to ensure 2 GB of memory per process. -# If the number of processes is greater than the amount of available memory (considering 2 GB per core) we restrict the number of cores to use. +# If the number of processes is greater than the amount of available memory (considering 2 GB per core) we restrict the number of parallel make jobs to avoid resource contention. # # Sample usage: # CPU_CORES=`check-cpu.sh`