Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Docker container does not respect resource limits #414

Open
worldtiki opened this issue Oct 18, 2018 · 1 comment
Open

Docker container does not respect resource limits #414

worldtiki opened this issue Oct 18, 2018 · 1 comment
Labels

Comments

@worldtiki
Copy link

worldtiki commented Oct 18, 2018

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:

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.

@bulicekj bulicekj added the bug label Oct 22, 2018
@shreyaa-sharma
Copy link
Member

@kapilra : Can you have a look at this.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants