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.

-QM
--
Quantum Mechanics: The dreams stuff is made of


In reply to Re: getting more resource from perl by QM
in thread getting more resource from perl by jesuashok

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.