Bad transfer performance with FTP on high latency links

Advertisement

tteras
Guest

Bad transfer performance with FTP on high latency links

Hi,

We are using WinSCP as FTP-client and found it very useful. Thank you.

However, some of the server to which we upload are connected with large bandwidth (>100mbit/s) links, but which have high latency (>100ms). This is generally known as "long fat pipes" [1].

TCP has had multiple updates to accommodate this kind of links: new congestion mechanisms, window scaling, selective ACK, etc. New operating systems (e.g. Windows Vista and later) automatically use all these when CTCP is enabled (netsh interface tcp set global congestionprovider=ctcp), but also the application must have large TCP-buffers in use to fully benefit from this.

Would it be possible to have the TCP buffer sizes configurable, or at least hard coded to sufficiently large: 2 or 4 megabytes. I have actually patched the winscp.exe binary, to use larger TCP-buffers and fixed everything.

The patching is equivalent to modifying filezilla/TransferSocket.cpp, there's two parts that do SetSockOpt(SO_SNDBUF). However, the buffer size you pass there (2*BUFSIZE)=(2*16384)=32kB. However, that is far too low for "long fat pipes" such us ours. The buffer should be 2-4 megabytes.

Kind Regards,
Timo

Reply with quote

Guest

Re: Bad transfer performance with FTP on high latency links

martin wrote:

Thanks for your suggestion.
This has been added to the tracker:
https://winscp.net/tracker/show_bug.cgi?id=787

Thank you. Increasing the SO_SNDBUF size fixes upload. (For me uploading to server with RTT 40ms, bumped from 600kB/s to 8-10MB/s which is link maximum; over 10x improvement).

It might be useful to have receive buffers (SO_RCVBUF) set too for downloading. Windows Vista and newer are supposed to have automatic TCP-buffer sizing, if it's not explicitly set. But I've seen it fail under certain circumstances. Additionally Windows XP and earlier set it incorrectly. <invalid hyperlink removed by admin> implies that Windows XP would never choose large enough buffer without registry modifications.

So it might be useful to have optionally set both the receive and send buffers.

Reply with quote

Advertisement

You can post new topics in this forum