At the time, I was sending one and receiving one file.
Pink is upload, yellow is download.
I’m just a casual user, using Syncthing to share files with a friend living far away from me, so I don’t have the access to the other device.
I can only say that both devices are on wired connection, and these kind of irregularities don’t happen elsewhere (e.g., uploading video to youtube or downloading file from cloud service).
Remote device:
Direct TCP connection over WAN
tcp-server TLS1.3-TLS_AES_128_GCM_SHA2 56
Syncthing is mainly limited by CPU and disk IO. Just because your network bandwidth is not saturated does not mean you are not saturating something else.
It all depends on how the graph would have to look for it to seem “regular”.
But on a more serious note…
The pink/upload graph relative to the yellow/download graph looks fairly normal to me. While more expensive business internet connections are frequently symmetrical (i.e., same download/upload speeds), home broadband is more likely to be asymmetrical with downloads being multiple times faster than upload speeds.
Asymmetric download/upload speeds results in the yellow/download graph being more “spiky” because less time is required to download each network packet. In contrast, the pink/upload graph looks more like the silhouette of a mountainous ridge because each network packet transfer is spread out over a longer period.
However, the graph only covers a 88-second window of time, which isn’t really enough to discern any kind of real trend or even diagnose a potential ongoing problem.
Syncthing dices up files into blocks and avoids resending duplicate blocks so the time to transfer a single file isn’t necessarily going to be linear (i.e., file size divided by network speed). A number of factors affect transfer speeds, including, but not limited to:
The system resources of each device. Devices with more CPU horsepower will be able to compute the required hashes faster.
Number of interconnected devices sharing a Syncthing folder. The more devices there are, the more that transfers can be done in parallel between multiple devices.
File types being synced. Files with higher probability of overlapping blocks require less time than highly compressed files such as audio and video.
Operating system.
You didn’t mention what your and your friend’s download/upload speeds are, what type of broadband connection it is, etc.
YouTube and a cloud storage provider are very different from Syncthing in terms of uploading and downloading. For the former, a few of the biggest factors are:
The transfer protocol is simple HTTP/HTTPS.
Doesn’t usually involve chunking files into blocks to look for redundancies.
YouTube and other cloud service providers make use of multiple high-powered servers, internet connections, and often a CDN service.
In comparison, you’re downloading/uploading from a single server without a boost from a CDN.
The configuration tuning page in the Syncthing documentation has tips on improving performance for a given environment. But keep in mind that if your friend’s computer is 10 years old and/or his network connection is slow, has high latency, etc., it won’t matter how fast your computer and network connection is.
There have also been quite a few forum threads regarding transfer speeds and ways to diagnose and improve them. In particular, search for posts mentioning iperf.
First of all, thank you for taking the time to answer.
Yes I am familiar with asynchronous bandwidth, I have it. However, that is not really what I’m concerned with, it is expected.
Thank you for explaining that about the files being diced into blocks, I did assume something like that could be happening.
And based on that, it does make sense that the graph is not perfectly linear.
The system resources of each device. Devices with more CPU horsepower will be able to compute the required hashes faster.
Number of interconnected devices sharing a Syncthing folder. The more devices there are, the more that transfers can be done in parallel between multiple devices.
File types being synced. Files with higher probability of overlapping blocks require less time than highly compressed files such as audio and video.
Operating system.
You didn’t mention what your and your friend’s download/upload speeds are, what type of broadband connection it is, etc.
Syncthing is mainly limited by CPU and disk IO. Just because your network bandwidth is not saturated does not mean you are not saturating something else.
To answer these questions…
CPU and Disk utilization on both devices is negligible (close to 0%), and I even did a CrystalDiskMark run on my drive, and everything looked pretty normal.
Folder is being shared just between 2 devices.
Files being synced are mostly videos.
Operating system is Win10 on both devices.
I have cable internet 300/30 Mbps, and my friends is around 500/150 Mbps (I’m not sure about the type of broadband)
To be clear, my upload speed is pretty slow (~3MB/s), so I didn’t expect any crazy speeds, but on that graph(y axis goes to 6MB/s), my upload speed hasn’t reached 3MB/s even once, and for the majority of the time, it’s bellow 1.5MB/s. I do understand dips but it seems like there are more dips than there are peaks.
And when I download file from my friend (yellow) that’s just super weird, I don’t understand why it peaks so sharp and there are such big pauses where speed is basically 0. Even those peaks barely reached 4-5Mb/s, even though my friends upload is is 150Mbps and my download is 300Mbps.
I tried transferring the same file with Syncthing on my cheap phone connected to a WIFI, connected to a free VPN.
And I got much better results. Transfer speeds were reaching my upload cap, and dips were sharper and shallower. So the average speed was much better overall.
And then by doing nothing other than pausing and unpausing the folder shared with my friend, transfer speeds between us also started looking better. Weird.
The next day I again tested the theory with pausing/unpausing the folder, and it seemed like it helped again, but after some time it would go back to looking like the first graph…
I can’t say anything for certain. I will play around with stuff, and if I find something out, I will write an update.
You could analyze the traffic using Wireshark and check for packetloss or retransmits. Use iperf3 to benchmark what the connection to your friend is really capable of. If iperf can’t reach the desired numbers than syncthing is not the culprit.
or on Linux:
sudo apt install iperf3
As your numbers are better on mobile, I’d suspect that the problem is either within your LAN(wifi,cabling,router,etc) or caused by your ISP.
Bad peering between both landline ISPs might be a factor.
Without any details about the CPU and disk hardware it’s not possible to gauge what effect it has on Syncthing.
What’s Syncthing’s hashing performance on your and your friend’s devices?
In Syncthing’s web GUI under Actions → Logs, when Syncthing starts there are a couple of lines like these:
2023-06-20 10:07:45 Single thread SHA256 performance is 185 MB/s using crypto/sha256 (185 MB/s using minio/sha256-simd).
2023-06-20 10:07:46 Hashing performance is 163.84 MB/s
So unless there are duplicate video files, each file will most likely have to be transferred in its entirety.
Although not necessarily an issue, note that there’s a bug in Windows Task Manager on Windows 10/11 that can cause incorrect CPU performance metrics on certain hardware configurations.
So your theoretical upload speed tops out at 3.75 MB/s. Accounting for overhead, real world speeds are likely to be 3.38 MB/s or less under ideal conditions.
And per your friend’s connection, Syncthing will be limited to 37.5 MB/s when you’re downloading, assuming of course that your friend’s system can sustain that level of throughput.
3 MB/s is 80% of your theoretical upload speed before factoring in overhead, latency, etc., so it’s generally unrealistic to expect a single process to saturate a network link on a preemptive multitasking system.
By default, Syncthing sets its process priority to “below normal” on Windows (setLowPriority configuration setting) to avoid a negative impact on system responsiveness.
Keep in mind that your friend’s side of the connection accounts for half of the equation.
33 MB/s is likely to be the max speed, and spikes of up to 30 MB/s are the most realistic scenario – again, before accounting for overhead, latency, packet loss, etc.
It sounds like you’ve been assuming that your friend’s system is going to allow you to saturate your download speed. What if your friend is running a BitTorrent client?
So…
Connected to a Wi-Fi access point that’s on the same LAN as your Windows 10 device?
The mention of a free VPN offers an interesting clue if Syncthing on your phone (Android?) is being tunneled thru the VPN. It’d mean that there’s an issue between your and your friend’s internet connection that hopping thru an intermediary avoids.
Is there a VPN between your and your friend’s devices?
Without more details it’s difficult to conclude why the transfer speeds were better.
There appears to be a roughly 20 second window where the speed gradually rises before it falls.
Other than mentioning that most of the files in the Syncthing folder are videos, you didn’t say…
… what the typical file sizes are.
… how many files are being synced.
… how often new files are added.
… if file watching is enabled and what the scan interval is in Syncthing.
Additional info that will be very helpful:
Screenshots of Syncthing’s web GUI with the device panel visible.
Syncthing’s log from both your and your friend’s devices.
iperf results.
The network throughput graphs have been interesting, but they only tell a tiny part of the story – it’s a bit like judging how good a car is by the range of its speedometer.
From what I can see so far, I don’t think the problem is with Syncthing. There have been a number of threads on this forum regarding transfer speeds, and if I recall correctly, none have resulted in Syncthing being the culprit so the odds are in Syncthing’s favor.