-
-
Notifications
You must be signed in to change notification settings - Fork 32.9k
Closed
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.
Description
Is your feature request related to a problem? Please describe.
It's unable to get actual available amount of processors in a docker container running on image node:10.16.0
, of which cpus is limited by docker container resource constraints. For detail information, please have a look at issue #28762.
Describe the solution you'd like
Provide os.availableProcessors()
api to get the actual available amount of processors.
Describe alternatives you've considered
If possible, it's better to fix the output of os.cpus().length
, e.g. by using Proxy
to change the value of length
property. Because most node modules use os.cpus().length
to decide how many processes it should fork, which may exceed the limitation of cpus in the docker container.
wanming, whq731, afbruch-ibm, qingdengyue, 0x11-dev and 2 morekeenwon
Metadata
Metadata
Assignees
Labels
feature requestIssues that request new features to be added to Node.js.Issues that request new features to be added to Node.js.osIssues and PRs related to the os subsystem.Issues and PRs related to the os subsystem.