Parallel thoughts

Michael G Schwern schwern at pobox.com
Tue Oct 2 01:45:02 BST 2007


Andy Armstrong wrote:
> I'd be interested to see what sort of comparisons people get on  
> different hardware with different flavours of test.

Here's Regexp::Common on a first gen Macbook (dual core).  It sure gets the
fan spinning.  CPU running at 75C, heat sinks at 60. :)

It's interesting to note that --fork with only one process comes out the same
as no forking at all, which is good in that it's what you'd expect and forking
isn't adding significant overhead.

It's also interesting that I get the same results no matter how many processes
I use.  This is also expected on a dual core machine running CPU and parser
intensive tests.

$ prove -rbQ
All tests successful.
Files=56, Tests=222870, 36 wallclock secs (22.65 usr  1.69 sys + 22.05 cusr
0.91 csys = 47.30 CPU)
Result: PASS

$ prove -rbQ -j9
All tests successful.
Files=56, Tests=223068, 43 wallclock secs (31.12 usr  2.17 sys + 22.19 cusr
0.95 csys = 56.43 CPU)
Result: PASS

$ prove -rbQ -j9 --fork
All tests successful.
Files=56, Tests=223156, 30 wallclock secs ( 0.23 usr  0.07 sys + 45.45 cusr
2.83 csys = 48.58 CPU)
Result: PASS

$ prove -rbQ -j5 --fork
All tests successful.
Files=56, Tests=223087, 29 wallclock secs ( 0.23 usr  0.06 sys + 45.05 cusr
2.68 csys = 48.02 CPU)
Result: PASS

$ prove -rbQ -j2 --fork
All tests successful.
Files=56, Tests=222811, 29 wallclock secs ( 0.23 usr  0.05 sys + 44.89 cusr
2.67 csys = 47.84 CPU)
Result: PASS

$ prove -rbQ -j1 --fork
All tests successful.
Files=56, Tests=222553, 36 wallclock secs (22.72 usr  1.70 sys + 22.07 cusr
0.92 csys = 47.41 CPU)
Result: PASS


-- 
Ahh email, my old friend.  Do you know that revenge is a dish that is best
served cold?  And it is very cold on the Internet!


More information about the tapx-dev mailing list