[issue30581] os.cpu_count() returns wrong number of processors on system with > 64 logical processors

robbuckley report at bugs.python.org
Fri Dec 1 04:43:34 EST 2017


robbuckley <rob at buckleynet.uk> added the comment:

hi, 
as the reporter i just want to say this is working for me with 3.6.3. 

Regarding https://bugs.python.org/issue30581#msg301150, I take your point that a lot of multiprocessing using the standard libraries may not benefit, as processes may be restricted to the processor group of the parent process (python). 

For my use case it works well: I launch a queue of blocking jobs, using a thread pool. Each thread launches 1 jobsubprocess.subprocess.run(), where the thread pool size is equal to number of processors reported by os.cpu_count(). Since the OS controls the scheduling in this case, it works perfectly well with 2 processor groups. 

thanks :-)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue30581>
_______________________________________


More information about the Python-bugs-list mailing list