SyncThing Relay Profiling

I was wondering if someone has ever profiled SyncThing relay server and have recommendations on the configurations to play with to achieve the optimal results for locally deployed Relay/Discovery and peer inside of the relay network + internet peer.

To me, the ones that called my attention are the ones related to NAT resolution and message timeout, but how do they impact performance directly?

What’s the issue you are trying to solve?

I am expecting a growing number of internet peers, and I want to achieve optimal performance, so I am trying to figure out switches that may help with that.

I don’t think you need to tweak anything.

Relays are pretty simple in what they do (read bytes, send bytes) and there aren’t many things to tweak. The only tweaks are timeouts to kill off dead clients, and those are mostly aligned with syncthing’s implementation so don’t need tweaking either.

Unless you have a specific problem, I don’t think you should tweak anything.

In that case, my understanding is inline with yours. After going through the code, the switches that called my attention were:

per-session-rate: (In case there are peers consuming too much bandwidth) network-timeout: Our case we plan to start with long-living peers, so I was planing to break it in 2 and having the default for network operations, but having a separate para for the TCP keep alive param.

network-buffer: Since initially computational resources are not an issue, I was planning to try larger buffer (8MB maybe).

Apart from that, I don’t see anything that we should change as you said. That’s why I was wondering if there was some kind of benchmark precreated that we can take as a base

Rate limits you should set if you want them, this is not an advanced parameter, and should be adjusted based on what bandwidth share you want to sacrifice.

FWIW, I run 3 public syncthing relays on ubuntu server and have yet to see any real load. AFAICT, syncthing clients look for low latency connections (according to the source code). If your relay is “nearby” many syncthing users, then maybe you can report back on resource usage. I run the sole relays in Iceland and India, I think, and they are nearly zero usage. My relay in California is the most utilized, and even then it barely hits 0.24 load average at peak usage on a dual-core system.

1 Like

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