-
Notifications
You must be signed in to change notification settings - Fork 24
Open
Labels
Description
Scenario
Deploy a docker container with the latest haystack ui tag and specify a cpu limit.
Expected
The Node process respects the resource limits and only sees the number of cpus allocated.
Actual
The Node process sees all the cpus of the host.
Notes
The problem affects the performance of the server by doing an unnecessary number of forks here:
haystack-ui/server/utils/server.js
Line 55 in ee08389
cluster.fork(); |
This is worse when running in a highly virtualized platform like Kubernetes where it's common to define cpu (and memory!) limits for each container.
I believe this is similar to this issue that affects Java containers.
If Node does not provide a solution a possible workaround would be to expose the number of cpus as a property and allow users to override it.