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

robbuckley report at bugs.python.org
Tue Jun 6 08:49:39 EDT 2017


New submission from robbuckley:

os.cpu_count() seems to report incorrect values on windows systems with >64 logical processors

tried it on 2 similar systems, both running windows 7 / 10 with python 3.6.1 64bit (anaconda):

platform1 - 2x Xeon E5-2698v4. 20 cores/CPU = total 80 logical cpus with hyperthreading
platform2 - 2x Xeon E5-2697v3. 14 cores/CPU = total 56 logical cpus with hyperthreading

os.cpu_count() reports 40 cores on platform1 and 56 on platform2

I would expect 80 and 56 respectively. 

I suppose this is because the windows api call used is not aware of processor groups, and reports only the number of processors in the current processor group ( eg GetSystemInfo vs GetMaximumProcessorCount )

----------
components: Windows
messages: 295254
nosy: paul.moore, robbuckley, steve.dower, tim.golden, zach.ware
priority: normal
severity: normal
status: open
type: behavior
versions: Python 3.6

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


More information about the New-bugs-announce mailing list