Anonymous Monk has asked for the wisdom of the Perl Monks concerning the following question:

Hi,
I wrote a perl script that uses http(LWP) to transfer files between two linux servers. But it is kind of slow.
May I know what all are the factors that affects the transfer of files from one server to another?
Thanks,
Tom

Replies are listed 'Best First'.
Re: Transfer Speed
by ww (Archbishop) on Oct 27, 2010 at 00:19 UTC
    What value of "slow" are you reporting: megabit speeds, 300 baud equivalent, multi-gigabyte?

    Are they co-located? Continents apart?

    What's the connection between the two servers -- DARPA's new private internet, dedicated long-lines, carrier pigeon?

    The answers by Anonymonk above are all generally true... but how any of them may or may not apply to your problem is something we can't guess without more information.

Re: Transfer Speed
by Anonymous Monk on Oct 26, 2010 at 23:39 UTC
    May I know what all are the factors that affects the transfer of files from one server to another?

    LWP itself is slow, the rest of the the factors are inherent to computer networks, and encompass everything from latency to lightning to sunspot activity (literally anything and everything)

Re: Transfer Speed
by aquarium (Curate) on Oct 27, 2010 at 02:52 UTC
    how many files and how big? are the machines on same subnet? are they real machines or virtual? where is the code?..to see if bottlenecked script what's the network traffic like? have you setup the linux boxes?..with enough RAM and proper paging space etc so the OS doesn't keep swapping to disk?
    the hardest line to type correctly is: stty erase ^H
Re: Transfer Speed
by JavaFan (Canon) on Oct 27, 2010 at 11:02 UTC
    So, how much faster is it if you use a different method of transfering files? What happens if you use wget or curl? A browser? A different protocol, like FTP? scp? rsync? Sneakernet?