The UploadBufferLength
property simply controls how much data Rebex FTP passes to the TCP stack in a single request. Although passing 64KB chunks instead of 4KB chunks can make a big difference, this doesn't affect the underlying transport layers:
The TCP protocol runs over the IP protocol. Most Ethernet LANs use MTU (Maximum Transfer Unit) of 1500 bytes. The size of an IP packet header is 20 bytes and the size of a TCPv4 packet header is 20 bytes as well. This means that 1460 is often the maximum segment size that can be transferred in a single TCP packet over Ethernet II networks. (Protocols like PPPoE can reduce this further.)
On the other hand, the UseLargeBuffers option (currently only available in Rebex SFTP) sets (among other things) Socket.SendBufferSize (equivalent of TcpClient.SendBufferSize) to 256KB and Socket.ReceiveBufferSize to 4MB, which causes larger window size to be used by the TCP protocol for the socket, resulting in increased speed (and slightly increased memory requirements).
We will add this option to the next release Rebex FTP(/SSL) that should be released within a week!
Update: FtpOptions.UseLargeBuffers
is available in Rebex FTP(/SSL) v3.0.3793.0.
At the moment, the value of Socket.SendBufferSize is not set explicitly, so it will be whatever the default value is. At my machine, it is 8192 (8KB). You can use the following code to determine the default buffer size at your machine:
using System.Net;
using System.Net.Sockets;
...
int sendBufferSize = new Socket(AddressFamily.InterNetwork,
SocketType.Stream, ProtocolType.Tcp).SendBufferSize;