Alexey Ischuk 0 Posted August 10, 2020 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, Alexey Share this post Link to post
Angus Robertson 574 Posted August 10, 2020 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. Angus Share this post Link to post
FPiette 383 Posted August 10, 2020 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
Alexey Ischuk 0 Posted August 11, 2020 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
Angus Robertson 574 Posted August 12, 2020 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. Angus Share this post Link to post
Cristian Peța 103 Posted August 12, 2020 28 minutes ago, Angus Robertson said: TCP buffer size of 66536 Maybe I am wrong but it is not 2^16=65536? Share this post Link to post
Angus Robertson 574 Posted August 12, 2020 Suspect that typo has propagated through a few units with copy/paste..... Angus Share this post Link to post