-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Closed
Labels
Description
Description
When running on Linux,
runtime/eng/native/build-commons.sh
Line 248 in 9a1debd
| __NumProc=$(nproc --all) |
nproc -all. However, when nproc -all returns all available parallelism, not the parallelism clamps done by /usr/bin/taskset $cpu_mask ...job invocation. Arguably, just nproc should be used here, not nproc -all since nproc returns the number of processors asked for by the parent /usr/bin/taskset
/usr/bin/taskset 0xf nproc -all
Returns 36 (that's what the hardware on my workstation has), but
/usr/bin/taskset 0xf nproc
returns 4, eg the popcount(0xf).
Reproduction Steps
See above
Expected behavior
There's a reason I clamp the number of cores I give to the build process tree. I wish the build process followed my wishes.
Actual behavior
uses number of hardware cores, not the number of cores I clamped it to
Regression?
No response
Known Workarounds
No response
Configuration
No response
Other information
Introduced in commit bad6ea0 by /cc @glebBalyk