Will sharing with more devices speed things up?

Hi forum,

I have a source folder (which is set to “send only”) and synced with a couple of target devices, some of which are on the same WiFi network with each other (but not with the source PC).

For reasons of mass deletion paranoia, I have additionally set all target folders to “receive only”.

I’m wondering whether syncing will be any faster if I share the folder not only from the source PC to the target PCs but also among the target PCs – what’s more, when these are all set to “receive only”?

It depends.

If the source device is connected to other devices via a high bandwidth link, it probably will not matter as the bottleneck will not be the network.

If we’re talking about high latency or low throughput links, then yes, being more connected means you can get parts of the file from more sources.

However this will only matter for large files, for small files your bottle neck will be the database, regardless of how many devices you are connected to.

Essentially, try it out and see, yet it might only become visible towards the end of the file.

1 Like

OK thanks! It’s normally more about smaller files really.

The bottleneck is the source device which is connected to everything else through a rather slow network.

If you are on a really low bandwidth connection, connecting devices in the same network might help still. In any case if we aren’t talking about large numbers of devices (<10 is definitely fine), I don’t see any downside to connecting - at worst your db will grow a little (for now, calmh proposed a fix for that).

1 Like

Thanks!

I also ask this because on all my slave devices, my sync folder is constantly being automatically reselected as “shared with…” two more slave devices by Syncthing, even though I keep deselecting these two slave devices there:

Only on the master device, the two other slave devices of course should remain selected as “shared” – which they do.

Am I doing (or expecting) something wrong here?

What exactly do you mean when using terms “master device” and “slave device”? I’m asking just to have a more clear understanding of your intentions here, because in Syncthing all devices are basically supposed to be equal peers.

1 Like

I have set up my synced folder on a “Master Device” A as “Send Only”, and to be shared with “Slave Devices” B, C, and D in A’s settings.

On B, C, and D, that synced folder is set up as “Receive Only”.

What I’m seeing is that the “Currently shared with devices B, C, D” as checked on A automatically keeps propagating to the same check marks in the settings on devices B, C and D, even when I’m de-selecting two of B, C, D on any of the devices B, C, D.

Is that intended behavior?

That is exactly the intended behaviour in case A is set as introducer for B, C and D.

The rationale here is that an introducer keeps devices aware of each other so that they can still keep in sync when half the swarm (including the introducer itself) goes offline.

1 Like

Thank you very much Evgeny for the concise clarification!

Does that also mean that there is any ‘sync (chunks) data flow’ between B, C and D even when they are all set to “Receive Only” and A is the only one set to “Send Only”?

Or will B, C and D receive every bit of sync data exclusively from A in this case?

“Receive Only” means that the device doesn’t make the changes to files made on this device available to the swarm. That, and only that.

So, say you have your setup. Device A adds files foo, bar, and baz while B and C are online, and D is offline. B and C become aware of this and start syncing: B gets foo, C gets bar, and then A gets offline so they don’t get baz. But now B is aware that there should be bar and baz, and C has exactly the copy of bar B needs, so B gets it from C. However, foo gets changed on B, and qux gets added. B doesn’t send the changes it made to foo, neither it tells anyone about qux, but B no longer has the version of foo that C needs, so C can’t get foo from B.

Now D comes online. It gets bar from either B or C, and becomes aware of foo and baz that neither of them has (well, B does, but it’s the wrong version), so D knows (and shows you in the interface) that it’s not completely synced.

B and C go offline, A comes online, D gets foo and baz and is now completely synced.

A goes offline again, B and C go online. They now know (from D) that they can get correct versions of foo and baz, and C does so; now C is in sync with the swarm, too. B gets baz, too, but doesn’t get foo, because it has a newer local version.

Now B shows you that it has local changes (new foo and qux that it never told anyone else about). If you (the user) press the “Revert local changes” button on B, it will re-download the “canonical” version of foo from anybody who has it, and remove qux, so that it becomes in sync with the swarm, too.

3 Likes

WOW Evgeny

!!!

THANK you so much for this exceptionally clear explanation.

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.