[paramiko] How to improve paramiko performance

Robey Pointer robey at lag.net
Sun Feb 17 22:05:36 PST 2008


On 15 Feb 2008, at 6:24, Deepak Rokade wrote:

> Hi All,
> With this mail I want to know "how to improve performance of  
> paramiko for transferring files over the internet through VPN"
>

This sounds really similar to the HPN thread, so you might check the  
HPN patches.

> Brief about what we are doing.
>
> I want to transfer files of size 5MB which are compressed with gzip  
> format over the VPN. This experiment is being carried out between  
> two cities located 1000km apart ()
>

For fast, latent pipes, you'll want large window sizes, but also note  
that SFTP is *terrible* over high latency links. The folks at the  
bazaar project found this out the hard way.

The problem is that SFTP requires you to send a block of data, then  
wait for an ack. The stop-and-wait wastes a lot of time if you have  
long round-trip times.

Paramiko can "cheat" a little if you use 'set_pipelined' (for sending  
files) or 'prefetch' (for receiving files).

Also note that I think the HPN window improvements require each side  
(client & server) to be running with the HPN patches. (Someone correct  
me if I'm wrong?)

robey




More information about the paramiko mailing list