Skip to content

Commit d3f3dae

Browse files
authored
Clarify check-cpu.sh documentation
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.
1 parent 7d73bc0 commit d3f3dae

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

docker/check-cpu.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#!/bin/sh
22

33
# This script is used to check the amount of available memory to ensure 2 GB of memory per process.
4-
# 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.
4+
# 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.
55
#
66
# Sample usage:
77
# CPU_CORES=`check-cpu.sh`

0 commit comments

Comments
 (0)