Re: multithreading concept

2007-03-08 Thread Paul Rubin
"Paul Boddie" <[EMAIL PROTECTED]> writes: > What makes all of the following not "Pythonic"...? > http://wiki.python.org/moin/ParallelProcessing I'd say mainly that they don't allow sharing data between processes except through expensive IPC mechanisms involving system calls. > I'm sure one could

Re: multithreading concept

2007-03-08 Thread Paul Boddie
On 8 Mar, 10:48, Bryan Olson <[EMAIL PROTECTED]> wrote: > > That doesn't really work in Python. There have been projects to > allow Pythonic coordination of processes -- POSH had some good > ideas -- but none have reached fruition. What makes all of the following not "Pythonic"...? http://wiki.py

Re: multithreading concept

2007-03-08 Thread Bryan Olson
sturlamolden wrote: [...] > If you want to utilize the computing power of multiple CPUs, you > should use multiple processes instead of threads. On Python this is > mandatory due to the GIL. In any other language it it highly > recommended. The de-factor standard for parallel multiprocessing (MPI)

Re: multithreading concept

2007-02-10 Thread Bjoern Schliessmann
Carl J. Van Arsdall wrote: > Not necessarily, if he's on a full duplex ethernet connection, > then there is some parallelity he can take advantage of. He has > upstream and downstream. Partly agreed. There is one bus to the network device, and CPU should be very much faster than the network devi

Re: multithreading concept

2007-02-09 Thread sturlamolden
On Feb 9, 4:00 pm, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > I am sorry if I sound foolish. > Suppose I split my Net application code using parallel python into several > processes based upon the number of CPU available. That means a single socket > descriptor is distributed across all processes.

Re: multithreading concept

2007-02-09 Thread Paul Rubin
"S.Mohideen" <[EMAIL PROTECTED]> writes: > Suppose I split my Net application code using parallel python into > several processes based upon the number of CPU available. That means a > single socket descriptor is distributed across all processes. Is > parallelity can be acheived using the processes

Re: multithreading concept

2007-02-09 Thread S.Mohideen
the single socket multiplexed across all the processes.. I haven't tried it yet - would like to have any past experience related to this. - Original Message - From: "Carl J. Van Arsdall" <[EMAIL PROTECTED]> To: Sent: Thursday, February 08, 2007 3:44 PM Subjec

Re: multithreading concept

2007-02-08 Thread Carl J. Van Arsdall
Bjoern Schliessmann wrote: > [snip] > What makes you think that'll be faster? > > Remember: > - If you have one CPU, there is no parallelity at all. > - If you do have multiple CPUs but only one network device, there is > no parallel networking. > > Not necessarily, if he's on a full duplex ethe

Re: multithreading concept

2007-02-07 Thread Bjoern Schliessmann
S.Mohideen wrote: > There is a dictionary on which I store/read data values. I want to > seperate the send and recv functionality on two different > processes so that the parallel execution becomes fast. What makes you think that'll be faster? Remember: - If you have one CPU, there is no paralle

Re: multithreading concept

2007-02-07 Thread Carl J. Van Arsdall
S.Mohideen wrote: > I would like to add my problem in this thread. > I have a network application in Python which sends and recv using a single > socket. > There is a dictionary on which I store/read data values. I want to seperate > the send and recv functionality on two different processes so t

Re: multithreading concept

2007-02-07 Thread S.Mohideen
Sergei Organov" <[EMAIL PROTECTED]> To: Sent: Wednesday, February 07, 2007 1:03 PM Subject: Re: multithreading concept > "sturlamolden" <[EMAIL PROTECTED]> writes: >> On Feb 7, 6:17 pm, John Nagle <[EMAIL PROTECTED]> wrote: > [...] >> MPI

Re: multithreading concept

2007-02-07 Thread Carl J. Van Arsdall
Paul Boddie wrote: > [snip] > > Take a look at the Python Wiki for information on parallel processing > with Python: > > http://wiki.python.org/moin/ParallelProcessing > What a great resource! That one is book marked for sure. I was wondering if anyone here had any opinions on some of the tec

Re: multithreading concept

2007-02-07 Thread sturlamolden
On Feb 7, 8:03 pm, Sergei Organov <[EMAIL PROTECTED]> wrote: > I fail to see how threads in general could perform worse than > processes. I do understand that processes are inherently more > safe/secure, but when it comes to speed I really can't imagine why it > could happen that threads perform w

Re: multithreading concept

2007-02-07 Thread Sergei Organov
"sturlamolden" <[EMAIL PROTECTED]> writes: > On Feb 7, 6:17 pm, John Nagle <[EMAIL PROTECTED]> wrote: [...] > MPI does not use threads on SMPs because it performs worse than using > multiple processes. I fail to see how threads in general could perform worse than processes. I do understand that pr

Re: multithreading concept

2007-02-07 Thread sturlamolden
On Feb 7, 6:17 pm, John Nagle <[EMAIL PROTECTED]> wrote: > Multithread compute-bound programs on multiple CPUs are > how you get heavy number-crunching work done on multiprocessors. In the scientific community, heavy CPU-bound tasks are either parallelized using MPI and/or written in Fortran

Re: multithreading concept

2007-02-07 Thread Steve Holden
John Nagle wrote: > sturlamolden wrote: >> On Feb 7, 2:53 am, "S.Mohideen" <[EMAIL PROTECTED]> >> wrote: >> This has been discussed to death before. Win32 threads and pthreads >> (which is what Python normally uses, depending on the platform) are >> designed to stay idle most of the time. They are

Re: multithreading concept

2007-02-07 Thread John Nagle
sturlamolden wrote: > On Feb 7, 2:53 am, "S.Mohideen" <[EMAIL PROTECTED]> > wrote: > This has been discussed to death before. Win32 threads and pthreads > (which is what Python normally uses, depending on the platform) are > designed to stay idle most of the time. They are therefore not a tool > fo

Re: multithreading concept

2007-02-07 Thread Paul Boddie
On 7 Feb, 02:53, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python > Programmer. T

Re: multithreading concept

2007-02-07 Thread sturlamolden
On Feb 7, 2:53 am, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python > Programmer.

Re: multithreading concept

2007-02-06 Thread Paddy
On Feb 7, 1:53 am, "S.Mohideen" <[EMAIL PROTECTED]> wrote: > Hi Folks, > > Python is praised about - me too. But at one instance it fails. It fails to > behave as a true multi-threaded application. That means utilizing all the > CPUs parallely in the SMP efficiently stays as a dream for a Python >