[Python-ideas] multiprocessing and physical CPU cores count

Giampaolo Rodola' g.rodola at gmail.com
Thu Sep 12 20:59:46 CEST 2013


This is a follow up of a feature request which recently appeared on psutil
bug tracker:
https://code.google.com/p/psutil/issues/detail?id=427

I don't know whether the proposal makes sense for psutil per-se but it
certainly made me think about multiprocessing.cpu_count() and the fact that
it currently returns the number of virtual CPUs (physical + logical).

Given that multiple processes cannot take any advantage of hyper threading
technology then maybe it makes sense for multiprocessing to expose a
physical_cpu_count() function in order to preemptively figure out how many
processes to spawn.

Same thing is discussed here:
https://groups.google.com/forum/#!msg/nzpug/_5sFW9BEMQ4/Y4laXRNlXkMJ

Thoughts?

--- Giampaolo
https://code.google.com/p/pyftpdlib/
https://code.google.com/p/psutil/
https://code.google.com/p/pysendfile/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20130912/9fea36d5/attachment.html>


More information about the Python-ideas mailing list