[Stackless] Multi core/cpu?

Steven H. Rogers steve at shrogers.com
Fri Oct 19 16:35:20 CEST 2007


On Fri, October 19, 2007 00:17, Allen Fowler wrote:
> Richard Tew <richard.m.tew at gmail.com> wrote: On 10/18/07, Allen Fowler
> wrote:
>> Is there any (near-term) hope to fix the common case of trying to
>> easily get more than one CPU core in a single physical machine to
>> process tasklets?
>
> No.  Not by anyone I can name on this list.  But if you want it, I
> encourage you to give it a shot.  ...
>
>
> I suppose you are correct.  However, as a python newbie, if I knew how to
> do this, I probably would not have posted here the first place.
>
> ...
>
> Put a Stackless Python interpreter on each core.  Make aware of each
> other.  Then pickle the tasklets you  want to move to other cores, and
> send them there.  Do the same across sockets to other cores on other
> computers on the network.  There are some technical issues involved in
> which tasklets can be pickled in this way, but finding out what they
> are is half the fun.
>
>
> IPC is complex. IPC is slow. IPC is hard.
>
> IPC (and concurrency) has already been figured out by many smart people.
> (MPI,Spread,etc.)
>
> ...

Concurrency is a tough nut to crack, which is why we've been happy to take
advantage of the free ride we've had the last few years while performance
scaled fairly well with clock speed.  Software to efficiently take
advantage of concurrent hardware is still a work in progress.  There has
been some discussion on python-dev about multi-core support, but don't
hold your breath for a solution in Python itself.

You should look at IPython1 (http://ipython.scipy.org/moin/IPython1).  I'm
not aware of anyone combining Stackless with IPython1, but it seems
doable.

# Steve




More information about the Stackless mailing list