Beefy Boxes and Bandwidth Generously Provided by pair Networks
Problems? Is your data what you think it is?
 
PerlMonks  

Comment on

( #3333=superdoc: print w/ replies, xml ) Need Help??
So what is the cause of the slowness of each individual script? Is it CPU, disk I/O, or waiting for external resources (for example, waiting for a file download) that takes most time?

If it's either CPU, harddisk access or database access that causes the slowness, then I would recommend against doing hem in parallel. 2 disk simultaneous hard disk accesses on the same disk will actually be slower than doing them one at a time, because the disk head has to constantly switch between the head positions for the 2 files. Likewise, doing 2 CPU intensive processes in parallel on the same CPU will not be faster than doing them one at a time, it'll only use more RAM.

If you're waiting for a file download to complete, you could have it do a few at a time. Also, if it's a combination of the above factors, you could get a speed gain doing them in parallel, for example one process could be accessing the disk while another is doing a computation.

Thus: do a benchmark test, limit the number of parallel processes, and see if it is actually faster, or not.


In reply to Re: require sugesstions for writing a perl script by bart
in thread require sugesstions for writing a perl script by lazydev

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!
  • 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, 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, 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.
  • Log In?
    Username:
    Password:

    What's my password?
    Create A New User
    Chatterbox?
    and the web crawler heard nothing...

    How do I use this? | Other CB clients
    Other Users?
    Others exploiting the Monastery: (7)
    As of 2015-07-05 21:35 GMT
    Sections?
    Information?
    Find Nodes?
    Leftovers?
      Voting Booth?

      The top three priorities of my open tasks are (in descending order of likelihood to be worked on) ...









      Results (68 votes), past polls