Multiprocessing: don't push the pedal to the metal?

John Ladasky ladasky at my-deja.com
Mon May 23 15:51:36 EDT 2011


On May 23, 2:50 am, Adam Tauno Williams <awill... at whitemice.org>
wrote:

> I develop an app that uses multiprocessing heavily.  Remember that all
> these processes are processes - so you can use all the OS facilities
> regarding processes on them.  This includes setting nice values,
> schedular options, CPU pinning, etc...

That's interesting.  Does code exist in the Python library which
allows the adjustment of CPU pinning and nice levels?  I just had
another look at the multiprocessing docs, and also at os.subprocess.
I didn't see anything that pertains to these issues.

> > Each CPU (or core) has its own execution cache. If you can keep one
> > thread running on the same core all the time, it will benefit more
> > from that cache than if it has to keep flitting from one to another.
>
> +1





More information about the Python-list mailing list