Beefy Boxes and Bandwidth Generously Provided by pair Networks
laziness, impatience, and hubris
 
PerlMonks  

Re^2: System Performance

by sgt (Deacon)
on Aug 23, 2007 at 10:06 UTC ( [id://634602]=note: print w/replies, xml ) Need Help??


in reply to Re: System Performance
in thread System Performance

just curious, can't you just test processes, I mean like this (from your favourite shell say) on unixlike

% cat run for i in {1..$1} do cpu-intensive-task & done wait % for t in 100 200 300; do time run $t; done # and plot the results
cheers --stephan

Replies are listed 'Best First'.
Re^3: System Performance
by BrowserUk (Patriarch) on Aug 23, 2007 at 10:31 UTC

    For performance testing, yes. Absolutely.

    My point about threading is simply that if you have a 32-way processor, unless you are constantly running 32+ separate tasks, you're wasting some of that power. However, if some or all of your your less than 32 concurrent tasks are set up for threading, then they will benefit (a little or a lot) whenever there are less than 32 tasks running.

    And there are many tasks, like the OPs primes algorithm and the other examples I cited, that do not lend themselves to being multi-tasked through forking, because they need access to shared data.

    All the problems with threading lie with the nature of the low-level abstractions for controlling shared memory access. The language that makes that easier, preferably transparent, will clean up in the future.


    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.

Log In?
Username:
Password:

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

How do I use this?Last hourOther CB clients
Other Users?
Others cooling their heels in the Monastery: (8)
As of 2024-04-16 09:18 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?

    No recent polls found