[issue23530] os and multiprocessing.cpu_count do not respect cpuset/affinity

Davin Potts report at bugs.python.org
Thu Feb 26 18:23:10 CET 2015


Davin Potts added the comment:

Detecting the number of processors available to a process is a distinct concept from reporting the number of processors present on a system.  cpu_count is currently focused on the latter.

Functionality to report the number of effectively-available processors is indeed valuable information to have in certain situations but it is also something very OS-dependent (I mean the support for it is not present in all OSes, let alone the complication of how to access such information differing across OSes).

I think a strong case can be made that cpu_count's current functionality should not change -- the information it provides is very important to have access to.

Cool tools like psutil (https://pypi.python.org/pypi/psutil) help cover a great range of genuine needs when making use of processor affinity.

----------
nosy: +davin

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue23530>
_______________________________________


More information about the Python-bugs-list mailing list