On Tue, 24 Oct 2017, Kannamraju P wrote:

It seems that the reads are done in sequential order , in networks which have latency this slows down the read quite a bit.

Yes of course they're sequential, since the API implies reading sequentially!

And it is a work-around to *help* when you have long latencies, as I tried to explain as it allows the first responses to arrive earlier than otherwise. It is especially effective if you're reading more data in a loop (in a non-blocking fashion), and not just that single function call.

SFTP is notoriously bad for long-latency connections (since each individual packet needs to be individually acked the in SFTP protocol layer). This approach is a way to try to make the effects of this less bad.

Is there any workaround or configuration at library level or TCP level to tune this.

We've previously discussed adding some way to allow applications to tweak this behavior, and in particular the block sizes and read-ahead length libssh2 does, but we've never gotten around to actually do it.

--

 / daniel.haxx.se
_______________________________________________
libssh2-devel https://cool.haxx.se/cgi-bin/mailman/listinfo/libssh2-devel

Reply via email to