Running Python on SMP machine
William Park
parkw at better.net
Tue Oct 10 08:13:38 EDT 2000
On Tue, Oct 10, 2000 at 02:22:31AM +0300, Erno Kuusela wrote:
> >>>>> "Aahz" == Aahz Maruch <aahz at panix.com> writes:
>
> | That's the Global Interpreter Lock. But my experience is that
> | frequently the overhead of synchronizing between two separate processes
> | overwhelms the payback you get from actual use of SMP -- that trick works
> | best if the two processes do no synchronization.
>
> yes. that is true regardless of what ipc model (threads/locks or
> message passing) you use. some tasks are inherently not
> parallelizable, while some tasks are.
>
> this is, however, not a good reason to use python threads
> for smp if your particular task is parallelizable. quite
> the opposite.
Hi Erno, can you elaborate on this?
My program is not particularly I/O intensive -- just slurping single
table at the beginning, and writing a smaller table at the end. But,
within my program, there are a lot of sections where calculations are
inherently independent. Eg.
c = a+b <- section 1, independent of section 2
d = a-b <- section 2, independent of section 1
e = c/d <- using result of the two sections.
---William Park, Open Geometry Consulting
More information about the Python-list
mailing list