Author giampaolo.rodola
Recipients giampaolo.rodola, paul.moore, pitrou, steve.dower, tim.golden, yanirh, zach.ware
Date 2018-03-28.13:09:05
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1522242545.14.0.467229070634.issue33166@psf.upfronthosting.co.za>
In-reply-to
Content
The difference between os.cpu_count() and psutil.cpu_count() is because one uses GetMaximumProcessorCount() and the other dwNumberOfProcessors.

This is tracked as a bug in psutil bug tracker but it's not fixed yet:
https://github.com/giampaolo/psutil/issues/771

As for Python this is where it was discussed and changed:
https://bugs.python.org/issue30581
https://github.com/python/cpython/commit/c67bae04780f9d7590f9f91b4ee5f31c5d75b3c3

In summary: psutil is wrong and you should rely on os.cpu_count().
History
Date User Action Args
2018-03-28 13:09:05giampaolo.rodolasetrecipients: + giampaolo.rodola, paul.moore, pitrou, tim.golden, zach.ware, steve.dower, yanirh
2018-03-28 13:09:05giampaolo.rodolasetmessageid: <1522242545.14.0.467229070634.issue33166@psf.upfronthosting.co.za>
2018-03-28 13:09:05giampaolo.rodolalinkissue33166 messages
2018-03-28 13:09:05giampaolo.rodolacreate