Archived Forum Post

Index of archived forum posts

Question:

CkFTP2 Excessively High Upload Speeds

Oct 06 '15 at 01:45

Hey there

I am having an issue with the FTP upload where the values reported are excessively high for one or two iterations and then they go back down to realistic values.

I would just like to know if there is a way around this or if anyone has noticed something similar.

Any help would be greatly appreciated.

Regards Sean Watkins


Answer

That's normal and somewhat unavoidable. At lowest level within the Chilkat internal code, there will ultimately be a call to the "send" system call to send data on a socket (http://linux.die.net/man/2/send)

Calling "send" is really just depositing the bytes to be sent in the operating system's send buffer for that TCP connection. Initially, when the OS buffer is empty, the "send" returns immediately. The app can continue while the OS is actually sending the buffered data. When the buffers become full, the "send" system call can block until the OS has caught up. (Internally, Chilkat uses non-blocking I/O so that it never gets stuck, and an app can always abort.)

Anyway, the behavior you'll see is that the initial data seems to be sent very fast. This is because it's the initial data deposited into the outgoing send buffers. Once they fill up, you'll see them come back to realistic values. An app could adjust by throwing out the 1st few numbers, or perhaps discarding the 1st few numbers that are greater than some threshold..