Beefy Boxes and Bandwidth Generously Provided by pair Networks
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??


in reply to Re^2: Multiprocessing on Windows (Cannot reproduce!)
in thread Multiprocessing on Windows

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.

  • Comment on Re^3: Multiprocessing on Windows (Cannot reproduce!)

Replies are listed 'Best First'.
Re^4: Multiprocessing on Windows (Cannot reproduce!)
by BrowserUk (Patriarch) on May 24, 2012 at 18:06 UTC

    Ah! The ol' when is a thread not a thread? When it's hyper :)


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

Re^4: Multiprocessing on Windows (Cannot reproduce!)
by BrowserUk (Patriarch) on May 25, 2012 at 03:34 UTC

    A further thought. What that doesn't explain is why you got such different (more favourable) results when using linux?

    Or were those results from runs on different hardware?


    With the rise and rise of 'Social' network sites: 'Computers are making people easier to use everyday'
    Examine what is said, not who speaks -- Silence betokens consent -- Love the truth but pardon error.
    "Science is about questioning the status quo. Questioning authority".
    In the absence of evidence, opinion is indistinguishable from prejudice.

    The start of some sanity?

      Different hardware.

Log In?
Username:
Password:

What's my password?
Create A New User
Domain Nodelet?
Node Status?
node history
Node Type: note [id://972182]
help
Chatterbox?
and the web crawler heard nothing...

How do I use this?Last hourOther CB clients
Other Users?
Others romping around the Monastery: (3)
As of 2024-04-20 02:58 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found