Jump to content
Alexey Ischuk

TFtpClient: Very low speed on transfer data

Recommended Posts

Hi All,


I have tested TFtpClient and found that it works very slow compared with FileZilla. I tested with two ftp servers and on both it works slow.

For example file uploading on one server:

TFtpClient ~ 230 KB

FileZilla > 10 MB !!!


I used sample demo from Samples\Delphi\FtpDemos\OverbyteIcsFtpTst.dproj

What may be a problem and how to fix it?


Thank you in advance,


Share this post

Link to post

14:17:11  < 226 File received ok
14:17:11  ! 85.8Mbytes received/sent in 38 seconds (2.20Mbytes/sec)

Few people have faster upload speeds than 2Mbytes/sec (20Mbit/sec) except on leased lines.  Don't believe 10Mbyte/s unless you are doing am unrealistic  local loopback test.




Share this post

Link to post

First remove any display and logging. This slow down considerably the server. Use display (Progress and so on) and logging for debugging purpose or apply a strategy more complex that what is in the demo.


Share this post

Link to post

Thanks everybody for your help, especially to Fr0sT.Brutal. Increasing DataSocketSndBufSize, DataSocketRcvBufSize resolve this problem.

Thank you very much.

Share this post

Link to post

Seems we have a historic problem with TCP buffer receive and send sizes, whose size should ideally depend on “Bandwidth-Delay Product” (BDP) which relates to TCP round trip time and bandwidth. 


Windows 10 has a default TCP buffer size of 66536, not sure if that is dynamic or fixed.  Windows 7 is still 8192 default, or at least my VM is.


Some of our components allow buffer sizes to be changed setting a minimum of 1024, with the FTP client component defaulting to 8192.  So it actually reduced efficiency.  The OverbyteIcsXferTst sample set the size to 32768 but even that is less than the current default. 


So I'm going through various units changing buffer setting to only increase size and not reduce it, and setting 66536 as the default.




Share this post

Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now