From your description, I doubt that the process could be tremendously improved as it stands: the process is I/O-bound and the I/O capabilities of the machine are lackluster. The process could be realistically (but, perhaps significantly) improved by re-defining it and then, as others suggested, “throwing silicon at” (the re-defined process).

Now to debunk Yet Another of your Inglorious Theories.

This shows a perl program downloading an 11MB file using 1,2,4,8,16 & 32 concurrent streams, on my 4 core CPU, across my relatively tardy 20Mb/s connection:

C:\test>1107326 -T=1 http://************/goldenPath/hg19/chromosomes/c +hr21.fa.gz Fetching 11549785 bytes in 1 x 11549786 streams Received 11549785 bytes Took 55.765514851 secs C:\test>1107326 -T=2 http://************/goldenPath/hg19/chromosomes/c +hr21.fa.gz Fetching 11549785 bytes in 2 x 5774893 streams Received 11549785 bytes Took 27.654243946 secs C:\test>1107326 -T=4 http://************/goldenPath/hg19/chromosomes/c +hr21.fa.gz Fetching 11549785 bytes in 4 x 2887447 streams Received 11549785 bytes Took 15.210910082 secs C:\test>1107326 -T=8 http://************/goldenPath/hg19/chromosomes/c +hr21.fa.gz Fetching 11549785 bytes in 8 x 1443724 streams Received 11549785 bytes Took 9.515606880 secs C:\test>1107326 -T=16 http://************/goldenPath/hg19/chromosomes/ +chr21.fa.gz Fetching 11549785 bytes in 16 x 721862 streams Received 11549785 bytes Took 8.902327061 secs C:\test>1107326 -T=32 http://************/goldenPath/hg19/chromosomes/ +chr21.fa.gz Fetching 11549785 bytes in 32 x 360931 streams Received 11549785 bytes Took 16.386690140 secs

As you can see, you get diminishing returns from the concurrency, but over provisioning the 4 core CPU to manage 16 concurrent IO-bounds threads results in the best throughput.

And how does that compare to using WGET and a single thread on the same connection and processor:

C:\test>wget http://************/goldenPath/hg19/chromosomes/chr21.fa +.gz --2014-11-17 11:38:37-- http://************/goldenPath/hg19/chromosom +es/chr21.fa.gz Resolving ************... 128.114.119.*** Connecting to ************|128.114.119.***|:80... connected. HTTP request sent, awaiting response... 200 OK Length: 11549785 (11M) [application/x-gzip] Saving to: `chr21.fa.gz' 100%[================================================================= +===================>] 11,549,785 379K/s in 32s 2014-11-17 11:39:30 (352 KB/s) - `chr21.fa.gz' saved [11549785/1154978 +5]

It beats it hands down!

************ server name redacted to discourage the world+dog from hitting them by way of comparison.


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.

In reply to Re^2: Getting/handling big files w/ perl by BrowserUk
in thread Getting/handling big files w/ perl by Gisel

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.