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
When run in Docker psutil returns threads as physical cores #1326
Labels
Comments
rightisleft
changed the title
Docker returns threads as core
When run in Docker psutil returns threads as physical cores
Aug 16, 2018
You can check what the kernel says with the following commands:
That's basically what psutil does (in C). |
Odd response:
Simplifying to grep cpu returns:
|
You basically don't have |
Closing as it seems a problem with docker. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Problem:
Given that i am running inside a docker container,
When i run psutil.cpu_count(logical=False),
Then it should only return the number of cores AND exclude threads
What i'm seeing
I'm running docker on OS X. When i test psutil.cpu_count(logical=False) on my macbook, i get the following:
OS X
DOCKER VIA OS X
Actual Hardware:
https://ark.intel.com/products/65524/Intel-Core-i7-3770S-Processor-8M-Cache-up-to-3_90-GHz
The text was updated successfully, but these errors were encountered: