Relay transfer faster then direct?? Why?

I have a publicly available IP on a router and a port 22000 forwarded to Syncthing server on Linux (1.14.10 at the moment). I also have a Windows laptop behind the same router with Syncthing installed (1.14.12).

I am syncing files to a remote destination on the other side of the globe. For some reason I only get 100 KiB/s from my Syncthing server, while I get 600 KiB/s from the laptop via a relay server at the same time (so total is 700 - this is still way below my internet speed limit). I cannot understand why I get such low speed from a direct connection. All settings are default. Tried changing copiers-pullers-hashers everywhere - no change. Currently all set to 0.

Are you transfering a single large file? If not, then overhead per file makes the rate fluctuate quite badly potentially making you think its better or worse while being completely relative to the size of the current file in question.

I am currently transferring one large file, but I also tried transferring multiple files at once (by setting copiers to 4 or 8) and did not see any improvevment. I also see that there is only 1 TCP connection to each host - 1 to my public IP and 1 to the relay server. So I’m bound by 2 TCP connections at the moment. I thought that if I increase pullers I would increase TCP connections, looks like it’s not true. Is there a way to increase TCP connection count so I could use 2+ connections to the same host?

Syncthing always uses 1 TCP connection per device.

The number of pullers define the transfer queue (more or less). copieres (and hashers) are local only (afaik).

I can imagine, that the direct connection to the other side of the globe has a bad routing or something, while the connection to the relay is better from both sides.

IIRC in another ticket, it was suggested to set the pullers to something like 128, which can increase the speed with high latency connections.

Ok I’ve found why relay is faster for me - because of TCP protocol - since I’m limited by TCP speed due to high RTT, speed in a path with two shorter segments is better then speed over a single longer segment, speed on a path is mostly limited by the speed on the longest segment.

Need to make Syncthing utilize a pool of connections per host, or UDP, or smth like that. Any plans on that or is this available now?

There are some plans for udp transport yet I am skeptical to believe it will help. Just by how much slower it will be in general due to being in userspace.

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