I compiled Syncthing with TLS_RSA_WITH_RC4_128_SHA only in the list, and the results are pretty surprising. Here is my setup (both are Linux Mint 17 = Ubuntu 14.04):
- a desktop, CPU Intel Core i3 (LAN)
- laptop, CPU Intel Core2Duo (LAN), much less powerful than the desktop since it uses a 32bits OS and Syncthing only uses one core)
I’ve cleaned completely the ~/.config/syncthing folder on both machines, and did a setup from scratch. The speed test is done with 2 files, the first one is ~ 1.3 Go while the second one is ~ 4.7 Go. These files are added on the desktop, and transferred to the laptop.
In each case, I turn off Syncthing on the laptop, add the file on the desktop, and when it is hashed, I turn on the laptop. So I’m sure the CPU load is only coming from the data transfer.
File 1, ~ 1.3 Go.
Transfer speed: 30-35 Mo/s (8 Mo/s with AES)
CPU load on the desktop (sending): 70-80 % of 4 cores
CPU load on the laptop (receiving): 95-100 % of 1 core
I thought at first that the encryption algorithm was THE reason, but then I tested with another file.
File 2, ~ 4.7 Go.
Transfer speed: 16Mo/s, quickly decreases to an average of 7-8 Mo/s (speed with AES unknown)
CPU load on the desktop (sending): 95-100 % of 4 cores (?)
CPU load on the laptop (receiving): 20-30 % of 1 core (?!?)
Damn, this is weird: the transfer speed depends on the file size, and the CPU load on the sending peer even more!
To be sure, I transferred a third file, ~ 1.5 Go. Result as expected, transfer speed of about 30-35 Mo/s. But then I noticed something on this transfer (CPU load on top, transfer speed at bottom):
At the level of the (beautiful) red arrow, the CPU starts increasing while the transfer speed decreases. Unfortunately, the transfer is quite fast, and I cannot see if the trend if confirmed on a long term.
I am puzzled now: obviously, the encryption algorithm play a role. Indeed, I reach a transfer speed of ~ 30-35 Mo/s with the RC4 method while it is limited to 8 Mo/s with AES 128. But there seems to be something weird with Syncthing itself: why would the transfer speed depend on the file size? And why is the CPU load much higher on the sending peer, while it is clearly more powerful than the receiving peer? Finally, why do I see a decreasing transfer speed while the CPU load increases on the sending node? @calmh, do you have an idea?