On Sun, 15 Mar 2009, Daniel Stenberg wrote:

> Right now I'm at 20MB/s speed for SCP downloads but this code has some minor 
> regression still that I need to fix before I can commit. SFTP is at 12MB/s.

It's really all about the channel window handling, and when we're talking raw 
localhost transfers we clearly need to set a very large window to get close to 
top speed for SCP.

I've simplified the libssh2_channel_read_ex() function a lot and now we send 
the window adjust package less frequent.

I've also right now made the window adjust logic like this:

  if (window size < LIBSSH2_CHANNEL_WINDOW_DEFAULT*100 )

    set window size = LIBSSH2_CHANNEL_WINDOW_DEFAULT*200

Yes, 100 and 200! LIBSSH2_CHANNEL_WINDOW_DEFAULT is 64K so you can see how 
this is a pretty big window. This way, I can repeatedly transfer my 1GB file 
over SCP at 38MB/s! (SFTP still left at only almost 14MB/s).

If I do the logic with *10 and *20 window instead, I don't get more than 
~25MB/s! If I use *300 and *600 I in fact get close to 40MB/s. Which happens 
to be the openssh speed. I must confess this makes me pretty content.

Can anyone think of any particular downside with going with these rather 
extreme window sizes as-is, or should we work on getting a more clever scheme 
for them?

-- 

  / daniel.haxx.se

------------------------------------------------------------------------------
Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are
powering Web 2.0 with engaging, cross-platform capabilities. Quickly and
easily build your RIAs with Flex Builder, the Eclipse(TM)based development
software that enables intelligent coding and step-through debugging.
Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
_______________________________________________
libssh2-devel mailing list
libssh2-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/libssh2-devel

Reply via email to