How many concurrent file transfer from the same client?

Sometimes our users ask us how many concurrent file transfers can be initiated simultaneously by one client. The answer deserves a little bit of explanation.

First of all it is important to understand that this article is entirely focused on how to optimize the client side, in fact the server uses I/O completion ports and RTL critical sections to optimize concurrency under heavy load (hundreds or thousands of incoming client connections) and is therefore self-optimized.

The client side, instead, is very different. First of all the client has a GUI (graphical user interface) that needs to be synchronized with the “desktop” of the operating system. Furthermore, on the client side, the concept of “CPU core affinity” becomes very relevant. What is it? Let’s try to provide a simplified explanation…

Every time the client initiates a transfer, it creates a new “thread” in the operating system. Such thread is given an “affinity” to a specific CPU core. Today’s processors have multiple cores (dual-core, quad-core, octa-core, …) and a certain portion of code may run much faster if it always runs on the same core, instead of having to continuously switch context between different cores. Therefore, when the new thread is created, its affinity is set to a specific core and that will be the core executing the entire file transfer.

Therefore the ideal number of concurrent file transfers a client program (such as Syncplify.me FTP! or Syncplify.me FTP Script!) should initiate, is equal or lower than the total number of available cores in the device’s CPU. So, for example, if your laptop has a quad-core CPU, you should run 4 or less concurrent file transfers on it: that is the number that will guarantee the highest possible performance.

Print Friendly, PDF & Email
Bookmark the permalink.

Comments are closed