Skip to content

Commit d93d38b

Browse files
committed
Respect Linux cgroup CPU number for --threads value
We want to respect `cgroup` constraints so that when we run in a container, the default max threads value is appropriately set to the maximum number of cores in this container rather than the host OS's. We check both `/sys/fs/cgroup/cpuset.cpus.effective` (`cgroup v2`) and `/sys/fs/cgroup/cpuset.cpus` (`cgroup v1`) to find the number of cores.
1 parent 9653106 commit d93d38b

File tree

3 files changed

+89
-3
lines changed

3 files changed

+89
-3
lines changed

lib/util.js

+38-1
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)