multiprocessing vs thread performance

James Mills prologic at
Wed Dec 31 01:52:57 CET 2008

On Wed, Dec 31, 2008 at 8:42 AM, James Mills
<prologic at> wrote:
> As I continue to develop circuits and improve it's
> core design as well as building it's ever growing set
> of Components, I try to keep it as general as
> possible - my main aim though is distributed
> processing and architectures. (See the primes example).

Aaron, just wanted to demonstrate
to you the example (primes) that I mentioned

On Terminal A:

jmills at atomant:~/circuits/examples$ ./ -o primes.txt -b -p 1000 -w

Total Primes: 1001 (23/s after 44.16s)
Total Events: 43373 (983/s after 44.16s)
 c1096b40-7606-4ba7-9593-1385e14ef339: 348
 8313b43f-d45d-4a0a-8d87-e6a93d3dfb0b: 653

On Terminal B:

jmills at atomant:~/other/circuits/examples$ ./ -b -s

The example uses circuits to distribute work
amongst any arbitrary number of nodes connected
to the system. This is all manually implemented
by simply taking advantage of the circuits framework
with my basic understanding ( so far ) of distributed
processing, virtual synchrony, and other techniques.

This is the same thing just run on a single node (no

jmills at atomant:~/circuits/examples$ ./ -o primes.txt -b -p 1000

Total Primes: 1001 (17/s after 62.13s)
Total Events: 28579 (460/s after 62.13s)
 701be749-9833-40a4-9181-5ee18047b1ad: 1001

As you can see, running 2 instances almost halves
the time. If you do try this though, you'll note that
the CPU isn't being used very heavily at all - This
could be improved - but the example merely
demonstrates distributed event processing and


More information about the Python-list mailing list