0 votes
by (120 points)

I have been using the Rebex FTP (not sftp) component for a number of years and just recently realized how slow the uploads were compared to using an FTP client / GUI program. I had read all of the similar posts here, and have tried this:

var ftp = new Ftp();
ftp.Settings.UseLargeBuffers = true;
ftp.UploadBufferLength = 128 * 1024;

And have tried various largeer buffer lengths, but like all the other similar posts I can only get 500k - 600k / sec. showing in resource monitor as the network bytes sent.

Are there additional settings to increase upload speed?

Thanks

Applies to: Rebex FTP/SSL

1 Answer

0 votes
by (136k points)

Which version of Rebex FTP do you use? With the current version, I'm easily able to achieve transfer speeds of around 100 MB per seconds, with TLS encryption, when running over a fast network, using the following simple console app:

var ftp = new Ftp();

ftp.Settings.UseLargeBuffers = true;
ftp.UploadBufferLength = 128 * 1024;
ftp.Connect("myserver", 21, SslMode.Explicit);
ftp.Login("user", "password");
ftp.ChangeDirectory("/home/user/upload");

string fileName = "data.bin";
byte[] data = Rebex.Security.Cryptography.CryptoHelper.GetRandomBytes(256 * 1024 * 1024);

int ticks = Environment.TickCount;
ftp.PutFile(new MemoryStream(data, false), fileName);
int duration = Environment.TickCount - ticks;
Console.WriteLine("Duration: {0} seconds", duration / 1000.0);
Console.WriteLine("Speed: {0} MB/sec", data.Length / (1000.0 * duration));

ftp.DeleteFile(fileName);
by (120 points)
Hi, thanks for the reply. I bought it like 5 years ago, it is "Rebex FTP/SSL (2017 R3) for .NET 4.0" Version "4.0.6339.0"
by (136k points)
We made numerous improvements in those 5 years, some of which increased performance a bit. But still, 500k/sec seems somewhat low. How does the code above perform with that version?
Also, please not that your support contract expired in 2018, which means that even if you don't want to upgrade to an up-to-date version, you can try using a more recent release (https://www.rebex.net/ftp-ssl.net/history.aspx#2018R1.1) that is supposed to improve performance a bit.
...