To be honest, I'm not sure if this belongs in Meditations or in Seekers of Perl Wisdom. I opted for here because its more of some observations that I have recently made concerning the File::Copy module. I work with a system that automatically transfers files around for various business units. These transfers are primarily handled by a third-party system and mostly it handles transferring files between Unix/Solaris and Intel/W2K platforms. I work mostly with the Unix side of the equation and I set most everything up to run out of Perl. Recently, we were asked to look at the speed of transferring around 2Gigs+ of data to a separate Unix box. We are really only moving the files into a local directory that is NFS mounted on the remote box. We tried three separate methods, the first from the commandline doing a straight
cp of the files into the destination directory, then I ran a Perl program that looped through and using the
copy method from File::Copy, and lastly, using the third-party software to do the copy (out of the same Perl program). We timed the first method out at about 10 minutes to copy all the files, likewise, the third-party program took about the same amount of time. However, when I ran the Perl program using File::Copy, the time was closer to 4 minutes (give or take a few seconds here and there).
What really intrigues me is why copying the files with File::Copy is so much faster? I can assume that there is some latency introduced when I run the third-party transfer program out of a Perl program since I am forking out to the system to run it, but that might account for maybe a minute or so in total, even that is still quite a bit more than what File::Copy is doing. Anyone have any thoughts on this?
"Ex libris un peut de tout"
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: |
| & | | & |
| < | | < |
| > | | > |
| [ | | [ |
| ] | | ] |
Link using PerlMonks shortcuts! What shortcuts can I use for linking?
See Writeup Formatting Tips and other pages linked from there for more info.