Mon Mar 17 12:18:02 CET 2014
Comparing the ssh_sftp:read_file execution time to command line sftp shows a big difference. I experimented with a ~7MB gzipped file, downloading it from a Debian machine to my Win7 laptop. I tested it with Erlang R15B03, R16B02 and R16B03-1.
While the Cygwin sftp transferred it in 4 seconds at 1.7MB/s speed, ssh_sftp:read_file got it in 30-20 seconds, depending on the erlang version. R16B03-1 shows improvement compared to the older releases, so it got the file in ~20s (the older ones needed ~30s).
Writing a small program and using ssh_sftp:read to get the file in 64KB chunks speeds up the file transfer on all releases. The best I got with this is ~11 seconds on R16B03-1 (~20s on the older Erlang releases). But that is still far from the 4 seconds of the Cygwin command line sftp.
Is there a way to further speed up the sftp file transfers in Erlang to reach (or at least to get near to) the command line sftp?
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions