71cf268d   
   From: grahn+nntp@snipabacken.se   
      
   On Sat, 19 Sep 2009 23:32:31 -0700 (PDT), kavi wrote:   
   > On Sep 15, 7:34 am, yawnmoth wrote:   
   >> I'm trying to upload a 1mb file using SFTP and the upload is taking   
   >> quite a bit longer than the download. I was thinking that, to speed   
   >> it up, I might use non-blocking sockets. Before receiving   
   >> confirmation that a portion of a file has been written, I send the   
   >> next portion. The thing I'm worried about is this: might the SFTP   
   >> server silently drop packets?   
   >>   
   >> The fact that some packets might wind up being sent out-of-order isn't   
   >> really an issue - each SFTP packets contains the starting address and   
   >> the length.   
   >>   
   >> Anyway, any ideas?   
   >   
   > < If not related to sftp>   
   > Are you using some custom sftp ?   
      
   By the way, if I recall correctly SFTP is a bit weakly defined, and   
   the name being used to cover various "looks like my old FTP client, but   
   works over ssh" scenarios, not just   
      
    T. Ylonen and S. Lehtinen, SSH File Transfer Protocol,   
    draft-ietf-secsh-filexfer-00.txt, January 2001, work in progress   
    material.   
      
   Maybe the OpenSsh implementation is the defacto standard.   
      
   > If not, There may be some issues regarding where you are trying to   
   > write these 1 MB file,   
   >   
   > If it is a flash, you may need to check how fast you are able to   
   > write in the flash ?   
   > just try to copy a local file from one directory to other and see how   
   > long it takes?   
   >   
   > Another idea is to check the network latency in general. If it is   
   > slow, you may need to address it first.   
      
   Good points. Other possible reasons for the speed difference:   
      
   - the OP does indeed have assymetric network speed. "Upload is taking   
    quite a bit longer than the download" describes my ADSL connection   
    pretty well.   
      
   - slow CPU on the downlink side. SSH spends a lot of time encrypting   
    and compressing data, and if you have reasonably fast networking,   
    CPU can easily become the bottleneck. I guess the sender needs more   
    CPU than the receiver, so a slow host A might be the bottleneck   
    A->B, but not B->A.   
      
   /Jorgen   
      
   --   
    // Jorgen Grahn O o .   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|