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

Limit the threads of thread pool #8724

Closed
gongweibao opened this issue Mar 4, 2018 · 3 comments
Closed

Limit the threads of thread pool #8724

gongweibao opened this issue Mar 4, 2018 · 3 comments
Assignees

Comments

@gongweibao
Copy link
Contributor

gongweibao commented Mar 4, 2018

https://github.com/PaddlePaddle/Paddle/blob/develop/paddle/fluid/framework/threadpool.cc#L33
When the program runs in Docker, the number of threads is the number of CPU the host and not the number of CPU in the container.

@helinwang
Copy link
Contributor

Maybe this will help? moby/moby#31424 (comment)

@Yancey1989
Copy link
Contributor

Maybe another way is to use the env variable to determinate the thread numbers, looks like more general.

@gongweibao
Copy link
Contributor Author

May we need an ENV variable to initial thread_num in a container.

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

No branches or pull requests

4 participants