in reply to Net::SFTP::Foreign is slow

Net::SFTP::Foreign on Windows uses a small pipeline (due to the lack of a proper select able to work in pipes), so, if your network has a relative high latency, it would perform poorly.

Try incrementing the pipeline size as follows:

$sftp = Net::SFTP::Foreign->new(..., queue_size => 32);
If that doesn't improve the transfer speed, add...
$Net::SFTP::Foreign::debug = 1|32|256;
at the beginning of your script and post here the output or send it to me by email (I am the module author btw).

Replies are listed 'Best First'.
Re^2: Net::SFTP::Foreign is slow
by ssubrat77 (Novice) on Jul 12, 2011 at 19:24 UTC

    Hi Salva, There is no improvement of adding the queue_size. I trust there is no issue with network as am able to download same file by WinSCP and performance is far better. I don't have your mail id so attaching some part of the debug message here

    #8788 1310498030.00000 got it!, len:32777, code:103, id:109, status: - #8788 1310498030.00000 queueing msg len: 25, code:5, id:141 ... [32] #8788 1310498030.00000 waiting for message... [32] #8788 1310498031.00000 got it!, len:32777, code:103, id:110, status: - #8788 1310498031.00000 queueing msg len: 25, code:5, id:142 ... [32] #8788 1310498031.00000 waiting for message... [32] #8788 1310498032.00000 got it!, len:32777, code:103, id:111, status: - #8788 1310498032.00000 queueing msg len: 25, code:5, id:143 ... [32] #8788 1310498032.00000 waiting for message... [32] #8788 1310498033.00000 got it!, len:32777, code:103, id:112, status: - #8788 1310498033.00000 queueing msg len: 25, code:5, id:144 ... [32] #8788 1310498033.00000 waiting for message... [32] #8788 1310498034.00000 got it!, len:32777, code:103, id:113, status: - #8788 1310498034.00000 queueing msg len: 25, code:5, id:145 ... [32] #8788 1310498034.00000 waiting for message... [32] #8788 1310498035.00000 got it!, len:32777, code:103, id:114, status: - #8788 1310498035.00000 queueing msg len: 25, code:5, id:146 ... [32] #8788 1310498035.00000 waiting for message... [32] #8788 1310498037.00000 got it!, len:32777, code:103, id:115, status: - #8788 1310498037.00000 queueing msg len: 25, code:5, id:147 ... [32] #8788 1310498037.00000 waiting for message... [32] #8788 1310498038.00000 got it!, len:32777, code:103, id:116, status: - #8788 1310498038.00000 queueing msg len: 25, code:5, id:148 ... [32]
      What version of the module were you using when you got this output?
        I am using Net::SFTP::Foreign 1.65 and Net_SSH2 0.03
        use Net::SFTP::Foreign; $Net::SFTP::Foreign::debug = 1|32|256;