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

Default worker thread number is the amount of HW threads, not the cpuset size. #5976

Closed
ipuustin opened this issue Feb 15, 2019 · 0 comments
Closed
Labels
design proposal Needs design doc/proposal before implementation

Comments

@ipuustin
Copy link
Member

Title: Default worker thread number is the amount of HW threads, not the cpuset size.

Description:
If --concurrency option is not specified, the default number of worker threads depends on the number of HW threads in the system. However, this number can be overly large, if Envoy is run in an environment where the allowed cpuset is small. The original intent seems to be that the number of worker threads should scale linearly with the available CPUs.

For example, if Envoy is started in a Docker container like this, Envoy can run only on four CPU cores:

$ docker run --cpuset-cpus="0-3" envoy-container

However, on a server with two physical cores with twenty cores each and hyperthreading enabled, 80 worker threads are started. If Envoy checked the assigned cpuset size, it would be clear that only four CPU cores are assigned to Envoy. It might make more sense then to start only four worker threads.

There's an associated PR #5975 for a possible fix for the issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design proposal Needs design doc/proposal before implementation
Projects
None yet
Development

No branches or pull requests

2 participants