Do you know where your variables are? | |
PerlMonks |
Re^3: Multiprocessing on Windows (Cannot reproduce!)by JohnRS (Scribe) |
on May 24, 2012 at 06:30 UTC ( [id://972182]=note: print w/replies, xml ) | Need Help?? |
Followup: I figured it out. It wasn't anything wrong with my machine. It's just how it works. I'm running a I7 840QM processor in a laptop. When you run just one or two CPU's, Turbo mode kicks in and boosts your speed by about 71%. So my "baseline" measurement of 25 seconds should really have been corrected to 43 seconds. Indeed, this matches almost perfectly with my 4 thread test results of 10.8 clock time and 42.1 user time. Then the amount of CPU power changes. Hyper Threading doesn't really give you twice as much crunch power. It depends on what you are doing, but in this case it gave me about 50%. Again, this explains why the CPU time went from 42 to 62 (50% more) when running the test for 4 and 8 threads, rather than remaining constant. Heat is definitely a bummer and it's worse in my laptop than it would be in a desktop or server. So overall I get about a 5.5x speed increase when running 8 threads instead of the full 8x increase. Fortunately, I'll be running the actual job on a real server. I tested it and I see about a 7.8x speed increase when running the 8 thread test on it. So all is well! Thank you again for your help. It put me on the right path to understand what was going on.
In Section
Seekers of Perl Wisdom
|
|