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

2017-12-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Thanks for the heads up Rob! -- ___ Python tracker ___

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

2017-12-01 Thread robbuckley
robbuckley 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

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

2017-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: os.cpu_count() is specified to return the total number of processors, not the number of usable processors. See e.g. https://bugs.python.org/issue26692 -- ___ Python tracker

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

2017-09-01 Thread tzickel
tzickel added the comment: One should be careful with this modification because of the Windows definition of process groups. For example, if multi-threaded code thinks that by reading the value of the new os.cpu_count() it can use all the cores returned, by default it cannot as in windows

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

2017-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: Backport merged. Thanks Chris! -- resolution: -> fixed status: open -> closed ___ Python tracker ___

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

2017-09-01 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset 58521fdba1657f6553a1ead5cbaa100967a167b3 by Antoine Pitrou (Christopher Wilcox) in branch '3.6': bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934) (#3267)

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

2017-09-01 Thread Chris Wilcox
Changes by Chris Wilcox : -- pull_requests: +3312 ___ Python tracker ___ ___

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

2017-08-30 Thread STINNER Victor
STINNER Victor added the comment: I reopen the issue to backport the bugfix to 3.6. -- resolution: fixed -> status: closed -> open ___ Python tracker

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

2017-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: Fixed. Someone might backport this to 3.6 if they want. -- resolution: -> fixed stage: patch review -> resolved status: open -> closed versions: -Python 3.5 ___ Python tracker

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

2017-08-30 Thread Antoine Pitrou
Antoine Pitrou added the comment: New changeset c67bae04780f9d7590f9f91b4ee5f31c5d75b3c3 by Antoine Pitrou (Christopher Wilcox) in branch 'master': bpo-30581: Windows: os.cpu_count() returns wrong number of processors (#2934)

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

2017-07-29 Thread Chris Wilcox
Chris Wilcox added the comment: I was reviewing the docs for the os module and cpu_count should always return the number of cpus on the system, not the usable CPUs. GetMaximumProcessorCount returns a simulated count in WoW64. I have reached back out to the Windows API dev and will see if

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

2017-07-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: I agree that the MS Docs for this are a bit confusing. I ended up reaching out to the guy who authored the GetMaximumProcessorCount function. I had also written an implementation that iterated over GetProcessorInformationEx and he advised against it. One

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

2017-07-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: About GetMaximumProcessorCount, MS doc states that it returns the "maximum number of logical processors that a processor group or the system can have", so maybe it also includes "empty" CPU sockets. GetActiveProcessorCount, on the other hand, returns "the

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

2017-07-29 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: MS documentation is not clear on what function should be used as there are many returning different values. Here it is being suggested to use GetLogicalProcessorInformationEx:

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

2017-07-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: needs patch -> patch review ___ Python tracker ___ ___

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

2017-07-28 Thread Roundup Robot
Changes by Roundup Robot : -- pull_requests: +2986 ___ Python tracker ___

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

2017-06-29 Thread Antoine Pitrou
Changes by Antoine Pitrou : -- stage: -> needs patch versions: +Python 3.5, Python 3.7 ___ Python tracker ___

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

2017-06-07 Thread Giampaolo Rodola'
Giampaolo Rodola' added the comment: Nobody has AFAIK. -- ___ Python tracker ___ ___ Python-bugs-list mailing

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

2017-06-07 Thread Chris Wilcox
Chris Wilcox added the comment: I am going to work on this if no one else has started. -- nosy: +crwilcox ___ Python tracker ___

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

2017-06-06 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___

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

2017-06-06 Thread robbuckley
robbuckley added the comment: yes, i believe its reporting the number of processors in the current group only, not across all groups. attached output of windows sysinternals/coreinfo showing 2 processor groups see https://github.com/giampaolo/psutil/issues/771 for some further disucssion of

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

2017-06-06 Thread STINNER Victor
STINNER Victor added the comment: On Windows, os.cpu_count() is currently implemented with: "GetSystemInfo(); return sysinfo.dwNumberOfProcessors;" https://msdn.microsoft.com/en-us/library/windows/desktop/ms724958(v=vs.85).aspx It seems to return the number of *logical* CPUs: """

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

2017-06-06 Thread robbuckley
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