www.libssh2.org | Daily snapshots | Mailing list archive | Docs | Examples | github

Archive Index This month's Index

Subject: SFTP read in libssh2 compared to SecureCRT

SFTP read in libssh2 compared to SecureCRT

From: Lars Nordin <Lars.Nordin_at_sdlabs.se>
Date: Mon, 23 Mar 2015 14:52:50 +0100

Hi,

I'm using libssh2 for different purpose, one of them is write/read files
using SFTP. I just start using version 1.5.0 and I can't get the
SFTP-read up to speed. I'm testing with a 76M file and using SecureCRT
SFTP I get 81s for the download, with libssh2 SFTP 44 minutes!!!

If a use SCP I get download in 12s!!

The libssh2_sftp_read() always return 2000, despite I call it with a
buffer of 100k.

If a look at the network with wireshark and compare the data on the
network, I notice that
o with SecureCRT SFTP the server send data in 1460 sized packages, at
least 10 packets before the client send some data (up to 32 packets I
notice)
o with libssh2 the server send data in different sizes (1460 and
less, many times 1460 followed by 592) and 1-4 packets before the client
send something.

The test is done using a OpenSSH sshd in a Linux virtual machine. Client
is Windows7

I copied the sftp_RW_nonblock example.

Can I change something?

/Lars

_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2015-03-23

the libssh2 team