<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	>
<channel>
	<title>Comments on: multiprocessing pystone benchmark</title>
	<atom:link href="http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/</link>
	<description></description>
	<pubDate>Wed, 07 Jan 2009 17:10:09 +0000</pubDate>
	<generator>http://wordpress.org/?v=2.6.3</generator>
		<item>
		<title>By: Administrator</title>
		<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/#comment-41621</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Thu, 19 Jun 2008 05:44:34 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/?p=447#comment-41621</guid>
		<description>There is something going on with the quotes... I get a 'non ASCII-character' error with your program, but it runs OK if I change all the single-quotes to double-quotes.
Perhaps you're on a unicode-only system?

Thanks for the results, I've added them to the graph.

As a further exercise I'm thinking of comparing pystones or another benchmark using different speedup techniques, i.e. psyco, cython etc,
shedskin looks very interesting: http://code.google.com/p/shedskin/</description>
		<content:encoded><![CDATA[<p>There is something going on with the quotes&#8230; I get a &#8216;non ASCII-character&#8217; error with your program, but it runs OK if I change all the single-quotes to double-quotes.<br />
Perhaps you&#8217;re on a unicode-only system?</p>
<p>Thanks for the results, I&#8217;ve added them to the graph.</p>
<p>As a further exercise I&#8217;m thinking of comparing pystones or another benchmark using different speedup techniques, i.e. psyco, cython etc,<br />
shedskin looks very interesting: <a href="http://code.google.com/p/shedskin/" onclick="javascript:pageTracker._trackPageview('/outbound/comment/code.google.com');" rel="nofollow">http://code.google.com/p/shedskin/</a></p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amitn</title>
		<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/#comment-41593</link>
		<dc:creator>amitn</dc:creator>
		<pubDate>Wed, 18 Jun 2008 21:01:18 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/?p=447#comment-41593</guid>
		<description>Thanks for the update, I spent some time changing it myself too. But  my indentation got screwed up.
You wanted 8 cores, here it is :)

Xeon DP 2.66ghzx2 (E5430) = 8 cores total

multiprocessing test.pystones() benchmark

You have 8 CPU(s)

Processes       Pystones        Wall time       pystones/s      Speedup
1               500000          6.9             72727           1.0X
2               1000000         6.8             147449          2.0X
3               1500000         6.8             221729          3.0X
4               2000000         6.8             292912          4.0X
5               2500000         6.8             365283          5.0X
6               3000000         6.8             438340          6.0X
7               3500000         6.9             506806          7.0X
8               4000000         6.9             577868          7.9X
9               4500000         10.2            441739          6.1X
10              5000000         11.3            441384          6.1X</description>
		<content:encoded><![CDATA[<p>Thanks for the update, I spent some time changing it myself too. But  my indentation got screwed up.<br />
You wanted 8 cores, here it is <img src='http://www.anderswallin.net/wp-includes/images/smilies/icon_smile.gif' alt=':)' class='wp-smiley' /> </p>
<p>Xeon DP 2.66ghzx2 (E5430) = 8 cores total</p>
<p>multiprocessing test.pystones() benchmark</p>
<p>You have 8 CPU(s)</p>
<p>Processes       Pystones        Wall time       pystones/s      Speedup<br />
1               500000          6.9             72727           1.0X<br />
2               1000000         6.8             147449          2.0X<br />
3               1500000         6.8             221729          3.0X<br />
4               2000000         6.8             292912          4.0X<br />
5               2500000         6.8             365283          5.0X<br />
6               3000000         6.8             438340          6.0X<br />
7               3500000         6.9             506806          7.0X<br />
8               4000000         6.9             577868          7.9X<br />
9               4500000         10.2            441739          6.1X<br />
10              5000000         11.3            441384          6.1X</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amitn</title>
		<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/#comment-41592</link>
		<dc:creator>amitn</dc:creator>
		<pubDate>Wed, 18 Jun 2008 20:54:22 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/?p=447#comment-41592</guid>
		<description>'''Here is a slightly improved version that actually runs


 Simple multiprocessing pystone.pystones() benchmark '''
''' Anders Wallin 2008Jun15 anders.e.e.wallin (at) gmail.com '''
from test import pystone
import processing
import time

STONES_PER_PROCESS= 10*pystone.LOOPS

def f(q):
    t=pystone.pystones(STONES_PER_PROCESS)
    q.put(t,block=True)

if __name__ == '__main__':
    processing.freezeSupport()

    print 'multiprocessing test.pystones() benchmark\n'
    print 'You have '+str(processing.cpuCount()) + ' CPU(s)\n'
    print 'Processes\tPystones\tWall time\tpystones/s\tSpeedup'

    results=processing.Queue()
    for N in range(1,processing.cpuCount()+3):
        p=[]
        q=processing.Queue()
        results=[]

        for m in range(1,N+1):
            p.append( processing.Process(target=f,args=(q,)) )

        start=time.time()
        for pr in p:
            pr.start()
        for r in p:
            results.append( q.get() )
        stop=time.time()

        cputime = stop-start    
        if N==1: singlecpurate = N*STONES_PER_PROCESS / cputime
		
        print "%u\t\t%u\t\t%.1f\t\t%.f\t\t%.1fX" % (N, N*STONES_PER_PROCESS,
			cputime, N*STONES_PER_PROCESS / cputime,
            N*STONES_PER_PROCESS / (cputime * singlecpurate) )</description>
		<content:encoded><![CDATA[<p>&#8221;&#8217;Here is a slightly improved version that actually runs</p>
<p> Simple multiprocessing pystone.pystones() benchmark &#8221;&#8217;<br />
&#8221;&#8217; Anders Wallin 2008Jun15 anders.e.e.wallin (at) gmail.com &#8221;&#8217;<br />
from test import pystone<br />
import processing<br />
import time</p>
<p>STONES_PER_PROCESS= 10*pystone.LOOPS</p>
<p>def f(q):<br />
    t=pystone.pystones(STONES_PER_PROCESS)<br />
    q.put(t,block=True)</p>
<p>if __name__ == &#8216;__main__&#8217;:<br />
    processing.freezeSupport()</p>
<p>    print &#8216;multiprocessing test.pystones() benchmark\n&#8217;<br />
    print &#8216;You have &#8216;+str(processing.cpuCount()) + &#8216; CPU(s)\n&#8217;<br />
    print &#8216;Processes\tPystones\tWall time\tpystones/s\tSpeedup&#8217;</p>
<p>    results=processing.Queue()<br />
    for N in range(1,processing.cpuCount()+3):<br />
        p=[]<br />
        q=processing.Queue()<br />
        results=[]</p>
<p>        for m in range(1,N+1):<br />
            p.append( processing.Process(target=f,args=(q,)) )</p>
<p>        start=time.time()<br />
        for pr in p:<br />
            pr.start()<br />
        for r in p:<br />
            results.append( q.get() )<br />
        stop=time.time()</p>
<p>        cputime = stop-start<br />
        if N==1: singlecpurate = N*STONES_PER_PROCESS / cputime</p>
<p>        print &#8220;%u\t\t%u\t\t%.1f\t\t%.f\t\t%.1fX&#8221; % (N, N*STONES_PER_PROCESS,<br />
			cputime, N*STONES_PER_PROCESS / cputime,<br />
            N*STONES_PER_PROCESS / (cputime * singlecpurate) )</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Administrator</title>
		<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/#comment-41591</link>
		<dc:creator>Administrator</dc:creator>
		<pubDate>Wed, 18 Jun 2008 20:36:58 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/?p=447#comment-41591</guid>
		<description>is it better now?</description>
		<content:encoded><![CDATA[<p>is it better now?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: amitn</title>
		<link>http://www.anderswallin.net/2008/06/multiprocessing-pystone-benchmark/#comment-41589</link>
		<dc:creator>amitn</dc:creator>
		<pubDate>Wed, 18 Jun 2008 20:07:38 +0000</pubDate>
		<guid isPermaLink="false">http://www.anderswallin.net/?p=447#comment-41589</guid>
		<description>get rid of the backquotes `` and use if __name__ = '__main' if you'd like others to be able to run this without errors and post their results.</description>
		<content:encoded><![CDATA[<p>get rid of the backquotes &#8220; and use if __name__ = &#8216;__main&#8217; if you&#8217;d like others to be able to run this without errors and post their results.</p>
]]></content:encoded>
	</item>
</channel>
</rss>
