Skip to content

Commit

Permalink
Respect Linux cgroup CPU number for --threads value
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
angelapwen committed Jan 22, 2024
1 parent 9653106 commit d93d38b
Show file tree
Hide file tree
Showing 3 changed files with 89 additions and 3 deletions.
39 changes: 38 additions & 1 deletion lib/util.js

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

0 comments on commit d93d38b

Please sign in to comment.