Beefy Boxes and Bandwidth Generously Provided by pair Networks
Just another Perl shrine

Re: getting more resource from perl

by QM (Parson)
on Nov 09, 2005 at 22:53 UTC ( #507245=note: print w/replies, xml ) Need Help??

in reply to getting more resource from perl

You may be asking the wrong question.

Why do you need more CPU time? Is your process not getting all available time? Is it competing with other processes? (If so, why can't those other processes use less time?)

Is the process IO bound? If so, getting more CPU time won't help. One way to check this is to simulate all IO by generating fake data for the process to chew on, but don't read or write from disk or other resources outside of the CPU/memory group. If the process suddenly speeds up by an order of magnitude, you need faster IO, not more CPU time. On the other hand, if simulating IO doesn't change the behavior, then either the process is swapping memory to disk, or it's CPU bound.

If it's CPU bound, do you know why? What part of the process is taking the most time? Have you profiled it with one of the Devel profiling modules? (My favorite is Devel::SmallProf, though there are others with different strengths.])

You might also look at How (Not) To Ask A Question.

Quantum Mechanics: The dreams stuff is made of

Log In?

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

How do I use this? | Other CB clients
Other Users?
Others chanting in the Monastery: (4)
As of 2022-05-20 14:03 GMT
Find Nodes?
    Voting Booth?
    Do you prefer to work remotely?

    Results (73 votes). Check out past polls.