b16e9e48   
   From: tome@siemens-emis.com   
      
   ""David Schwartz" wrote in message   
   news:87f91a8b-a515-447e   
   -950a-4d4100ef4d28@d15g2000prc.googlegroups.com...   
   > On Sep 14, 7:34 pm, 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?   
   >   
   > You seem to have quite a few misconceptions, but the one that really   
   > stands out is that you seem to think that there's a one-to-one   
   > correspondence between SFTP packets and packets on the wire. Nothing   
   > "glues" the bytes of an SFTP packet together below the SFTP layer. The   
   > TCP layer can segment them as it wishes and the IP layer can fragment   
   > those segments into packets however it wishes.   
   ...   
      
   Both Barry and David pointed out good reasons why using non-blocking   
   sockets won't improve your performance. Baring a bug in the TCP or   
   SFTP implemtation, SFTP should be able to transfer data at close to the   
   theoretical maximum that your network (and computer) can sustain.   
      
   So rather than starting by changing some code, I would start by   
   treating this as a performance problem and analyze why the upload   
   speeds are so slow. A network trace will usually show where the   
   bottleneck is. If you don't know how to interpret such a trace, I'm   
   sure there is someone on this group who could help interpret the   
   output.   
      
   --   
   Tom Einertson E-mail: tom.einertson@siemens.com   
   SIEMENS Power Transmission & Distribution Phone: (952) 607-2244   
   Energy Management & Automation Division Fax: (952) 607-2018   
   10900 Wayzata Boulevard, Suite 400   
   Minnetonka, MN, 55305   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   
|