You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Syncthing only uses one TCP connection to transfer data. This unfortunately means that if your ISP/network limits the speed intentionally (or on accident) per TCP connection you are limited to the single TCP connection speed.
One reason BTSync is so fast is that it uses multiple connections (even between the same two servers).
In my case, my ISP doesn't intentionally limit the single TCP connection speed, but in practice it is limited between 5 and 8 Mbit. Whereas if I open up a torrent client (yes, I know that is torrent protocol, not Block Exchange), I can max out the full 50 Mbit I pay for.
I have tested that it is not a bug in the download speed of syncthing, by intentionally leaving one node offline (out of sync), and then letting all of my other nodes sync up, then starting up the one node. Then I get 5X (number of nodes) Mbit instead of just 5.
Before you say, upload bandwidth is the problem on the server I am downloading from, it isn't. The aforementioned cluster of nodes is on a 100Mbit Symmetric connection.
While I don't dispute what you say (when the network is congested, using more TCP connections will be faster than just one, due to grabbing more than 1/x of the available bandwidth) I'm inclined to think of this as a network problem more than a syncthing problem... That is, I don't think the subject is a correct description of the problem - if the bandwidth is available, there is no reason a single TCP connection wouldn't make use of it. If the bandwidth isn't available but used by something else, using more TCP connections will grab a larger share by competing more.
changed the title [-]Syncthing makes poor use of available bandwidth[/-][+]Syncthing needs to implement simultaneous TCP connections [/+]on Apr 21, 2014
That is also the case in italy. I pay for a 6Mbit download connection but a single TCP connection never goes past 200 Kilobytes/s, but if I have multiple connections and sum their bandwidth I get a full 750 Kilobytes/s
A very simple workaround is to run multiple instances of syncthing on your server and link them to the same cluster, it works because you download stuff from multiple istances and that means multiple connections :)
Should not result in any corruption, but may result in some double work (two instances syncing the same file from a remote node at the same time) and confusion (one of them might consider it a failure since the temporary file disappeared, moved by the other, then retry). And somewhat of a pain to set up with separate config dirs, keys, etc. All in all I wouldn't recommend it, but it's your computer. :)
I know better than to ask for an ETA, since I am not paying anything, but can we play "hour day week month year never" on the resolution of this enchancement?
I can understand if it isn't a priority, and I assume it would require a protocol change of some sort.
At the moment it's deep into "if someone submitted a pull request that implemented this cleanly and optionally I would accept it" territory, i.e. no ETA since I'm not working on it. :) I can see the use case, but at the same time it's not something that's an issue in my setup. I consider syncing a background thing (with hopefully low impact on whatever else I'm really doing with my computer), so if there is a case where it doesn't grab all the available resources I'm kind of fine with that...
To summarize, I'm setting this as "won't fix", because thats the current status from my side and it sets the right expectations. But again, a fix from someone else wouldn't be rejected.
Any chance that this bug might be re-opened and worked with any time in the future?
I'm in the same boat here, with my two destinations being 8000 kilometers-ish from eachother being practically being so slow across one TCP connection that we're talking 5-10% of the utilization of the links. They are 1Gbit/s links directly connected via fibre directly into the switch where the syncthing-machines are located on both sides.
The latency is pretty horrid, so I guess thats why TCP is acting so bad. I managed to get it to act a few percentiles better by messing with TCP windows and qdisc/fq but no better than 15-20% on a REALLY good day.
When using btsync, lftp or aria2 i can easily use close to 95% of the links. So i guess i'm chiming in to say theres definitely a use case for this. I am aware of the views of this being a network problem, and if these destinations were in the same country or even continent i would be inclined to agree, but there is no loss here, just latency. I have also tried across both IPv4 and native IPv6 on both sides (creds on IPv6 support actually working in syncthing!) with the same results. So I feel theres not much i can do on the network side. We have even tried alot of direct peering deals on the longest stretches, without much luck.
Using UDP and some sort of control protocol to just throw the data over and retransmit stuff that doesn't get there either by throwing it again or pulling the missed blocks via TCP would also be great for me, but I don't know of anything like that being in the works for syncthing?
You may want to contribute to #804 if you want to speed this up, and there is work in that direction somewhat ongoing now and then although not super actively. General discussion of how things should and shouldn't work is better done on the forum.
THANK YOU, THANK YOU! I only tried this today and it makes a world of difference with my ISP. Finally, I can saturate my contracted upload bandwidth over the internet. I have a 100Mb/s down & 10Mb/s up contract on two different sites. Unfortunately my ISP (deliberately or accidentally) caps uploads at approx 2Mb/s per connection. Download rates are no problem, I can saturate 100Mb/s with just a single link. But single connection uploads suck.
I have found that this is a quite common problem for many users with different ISPs. It seems that from an ISP perspective they mostly deal with folks that are really only interested in download speeds. The few geeks who are self-hosters or whatever are simply getting under the bus. This makes it cheaper for ISPs because they need less expensive peering agreements with other network operators.
Now that I can set numConnections between the different sites (syncthing devices) my synchronization speeds are finally at the maximum possible 10Mb/s speed over the WAN!! I know this took a long time and I saw some heated forum discussions related to this topic. But finally, it is working. Thanks again!
enhancementNew features or improvements of some kind, as opposed to a problem (bug)frozen-due-to-ageIssues closed and untouched for a long time, together with being locked for discussion
Activity
calmh commentedon Apr 21, 2014
While I don't dispute what you say (when the network is congested, using more TCP connections will be faster than just one, due to grabbing more than 1/x of the available bandwidth) I'm inclined to think of this as a network problem more than a syncthing problem... That is, I don't think the subject is a correct description of the problem - if the bandwidth is available, there is no reason a single TCP connection wouldn't make use of it. If the bandwidth isn't available but used by something else, using more TCP connections will grab a larger share by competing more.
malcolmputer commentedon Apr 21, 2014
I agreed wholeheartedly that it is a network issue, but unfourtunately one that is out of my control.
With the current state of ISP's in my location (and much of the rest of the US) it would be a welcomed feature however.
[-]Syncthing makes poor use of available bandwidth[/-][+]Syncthing needs to implement simultaneous TCP connections [/+]malcolmputer commentedon Apr 21, 2014
Subject has been corrected.
fazo96 commentedon Apr 22, 2014
That is also the case in italy. I pay for a 6Mbit download connection but a single TCP connection never goes past 200 Kilobytes/s, but if I have multiple connections and sum their bandwidth I get a full 750 Kilobytes/s
A very simple workaround is to run multiple instances of syncthing on your server and link them to the same cluster, it works because you download stuff from multiple istances and that means multiple connections :)
malcolmputer commentedon Apr 22, 2014
Thank you for the suggestion, I hadn't thought of that.
calmh: How likely is that to corrupt things?
calmh commentedon Apr 22, 2014
Should not result in any corruption, but may result in some double work (two instances syncing the same file from a remote node at the same time) and confusion (one of them might consider it a failure since the temporary file disappeared, moved by the other, then retry). And somewhat of a pain to set up with separate config dirs, keys, etc. All in all I wouldn't recommend it, but it's your computer. :)
malcolmputer commentedon Apr 22, 2014
I know better than to ask for an ETA, since I am not paying anything, but can we play "hour day week month year never" on the resolution of this enchancement?
I can understand if it isn't a priority, and I assume it would require a protocol change of some sort.
calmh commentedon Apr 22, 2014
At the moment it's deep into "if someone submitted a pull request that implemented this cleanly and optionally I would accept it" territory, i.e. no ETA since I'm not working on it. :) I can see the use case, but at the same time it's not something that's an issue in my setup. I consider syncing a background thing (with hopefully low impact on whatever else I'm really doing with my computer), so if there is a case where it doesn't grab all the available resources I'm kind of fine with that...
calmh commentedon Apr 22, 2014
To summarize, I'm setting this as "won't fix", because thats the current status from my side and it sets the right expectations. But again, a fix from someone else wouldn't be rejected.
viddypiddy commentedon Mar 24, 2015
Any chance that this bug might be re-opened and worked with any time in the future?
I'm in the same boat here, with my two destinations being 8000 kilometers-ish from eachother being practically being so slow across one TCP connection that we're talking 5-10% of the utilization of the links. They are 1Gbit/s links directly connected via fibre directly into the switch where the syncthing-machines are located on both sides.
The latency is pretty horrid, so I guess thats why TCP is acting so bad. I managed to get it to act a few percentiles better by messing with TCP windows and qdisc/fq but no better than 15-20% on a REALLY good day.
When using btsync, lftp or aria2 i can easily use close to 95% of the links. So i guess i'm chiming in to say theres definitely a use case for this. I am aware of the views of this being a network problem, and if these destinations were in the same country or even continent i would be inclined to agree, but there is no loss here, just latency. I have also tried across both IPv4 and native IPv6 on both sides (creds on IPv6 support actually working in syncthing!) with the same results. So I feel theres not much i can do on the network side. We have even tried alot of direct peering deals on the longest stretches, without much luck.
Using UDP and some sort of control protocol to just throw the data over and retransmit stuff that doesn't get there either by throwing it again or pulling the missed blocks via TCP would also be great for me, but I don't know of anything like that being in the works for syncthing?
17 remaining items
calmh commentedon Dec 10, 2015
You may want to contribute to #804 if you want to speed this up, and there is work in that direction somewhat ongoing now and then although not super actively. General discussion of how things should and shouldn't work is better done on the forum.
all: Support multiple device connections (fixes #141) (#8918)
[-]Syncthing needs to implement simultaneous TCP connections [/-][+]Use multiple simultaneous TCP connections [/+]TCB13 commentedon Sep 27, 2023
Squashed commit of the following (actually merge upstream/main):
brummbrum commentedon Jan 17, 2024
THANK YOU, THANK YOU! I only tried this today and it makes a world of difference with my ISP. Finally, I can saturate my contracted upload bandwidth over the internet. I have a 100Mb/s down & 10Mb/s up contract on two different sites. Unfortunately my ISP (deliberately or accidentally) caps uploads at approx 2Mb/s per connection. Download rates are no problem, I can saturate 100Mb/s with just a single link. But single connection uploads suck.
I have found that this is a quite common problem for many users with different ISPs. It seems that from an ISP perspective they mostly deal with folks that are really only interested in download speeds. The few geeks who are self-hosters or whatever are simply getting under the bus. This makes it cheaper for ISPs because they need less expensive peering agreements with other network operators.
Now that I can set numConnections between the different sites (syncthing devices) my synchronization speeds are finally at the maximum possible 10Mb/s speed over the WAN!! I know this took a long time and I saw some heated forum discussions related to this topic. But finally, it is working. Thanks again!