2011/1/18 Daniel Stenberg <daniel_at_haxx.se>
> On Wed, 12 Jan 2011, zl liu wrote:
>
> the performance has increased 32%£º
>>
>
> First, you didn't say how large buffer you use, but if you use very large
> buffers you optimize the SFTP performance better.
>
My test is up on the example sftp_write_nonblock.c,the buffer is defined as
follow in the file sftp_write_nonblock.c:
char mem[1024 * 100];
in the function sftp_write() have the code:
/* we limit this to just send a single SSH packet at a time */
if(count > 32500)
count = 32500;
So i think the buffer is big enough.
>
> Then, sftp_write_sliding.c shows an even better way to do SFTP uploads with
> libssh2 as it allows it to keep the send pipe full all the time.
>
sftp_write_sliding.c is a better way of course. I just did a comparative
test.
>
> --
>
> / daniel.haxx.se
> _______________________________________________
> libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
>
>
_______________________________________________
libssh2-devel http://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel
Received on 2011-01-18