[Python-ideas] multiprocessing and physical CPU cores count

Richard Oudkerk shibturn at gmail.com
Thu Sep 12 21:27:41 CEST 2013

On 12/09/2013 7:59pm, Giampaolo Rodola' wrote:
> 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.

Do you have a reference?  Wikipedia may not be reliable, but it seems to 
think otherwise:

Hyper-threading works by duplicating certain sections of the processor—
those that store the architectural state— but not duplicating the main
execution resources. This allows a hyper-threading processor to appear
as the usual "physical" processor and an extra "logical" processor to
the host operating system (HTT-unaware operating systems see two
"physical" processors), allowing the operating system to schedule two
threads or processes simultaneously and appropriately.


More information about the Python-ideas mailing list