Not quite a support issue, just curious!
I have a single synced folder across two devices. If I add different files to this folder on the two devices, syncthing seems to scan one device, upload all the new stuff from that one, then scan the other and upload all the new stuff from that one. It seems like there is a large amount of time spent waiting for the one upload to complete rather than using the connection in both directions simultaneously.
Is this intended behavior? Can this be modified?
It can upload and download simultaneously, it cannot scan and download simultaneously because you are modifying the state while you are validating it, which means you can step on your own toes.
I see, that makes sense. Is there a way to force the downloading client to stop and scan its files?
It seems that if both clients have new files, it would be more efficient to scan both sides before beginning the transfer.
No there is not a way, apart from pulling the cable to cause failure or restarting syncthing.
Restarting Syncthing got it to rescan both sides, but it still seems to be uploading or downloading one file at a time rather than simultaneously exchanging new files.
How do you know that? It downloads one file at a time, which might give you that impression.
The download rate shows ~2 MiB/s, but the upload shows under 5 KiB/s, so there’s no real simultaneous uploading going on.
The rates are a sampled average over 10 seconds, so it all depends on the size of the file you are using.
You can use iptraf or some verbose logging to see what’s actually happening.
In this instance I’m using 2 folder of compressed archives split into ~650 mb pieces each (old habit from the days of backing up onto CDs), with folders containing between 50 and 100 files on each side. I don’t think the issue has anything to do with file size and averaged sampling, but I will look into iptraf to get a better idea. Thank you for the suggestion!
The other thing is, that you have to rescan for the both ends to realize that there is a new file both sides for that to happen. So at the point you add the files on both ends, rescan simultaneously.