Syncthing slow when installed via Docker/Portainer in Open Media Vault; ports are forwarded and Syncthing is connecting via TCP and not by relay, but sync speeds haven't improved. What should I be looking at to fix this?

Ports were forwarded in the router (for my OMV server only; my router doesn’t allow forwarding a port for the whole router) according to Docker Hub :

 - 8384:8384
 - 22000:22000/tcp
 - 22000:22000/udp
 - 21027:21027/udp

The ports are not forwarded for the other sync device (PC running Ubuntu 20.04, installed direct and not in Docker) as for IPv4, my router didn’t let me: it automatically chose different ports.

Within the Syncthing in Portainer, port config looks like this: 21027/udp
:::21027 21027/udp 22000/tcp
:::22000 22000/tcp 22000/udp
:::22000 22000/udp 8384/tcp
:::8384 8384/tcp 

Any ideas what else I could look at to resolve this?

EDIT the Syncthing Portainer states that the network is in bridge mode, using the network created by the stack used to install Syncthing.

You should check the type of connection between the Syncthing instances. Its stated in the UI.

Thank you - you mean by hovering over Address? It was relay previously - and the documentation/discussion online usually says that when sync is slow, the problem is that Syncthing is using a relay connection due to incorrectly forwarded ports (or not forwarded at all). I forwarded the ports as outlined in my post and it’s now TCP (specifically tcp-client TLS1.3-TLS_AES_128_GCM_SHA256). However, sync speed hasn’t improved (currently about 2.5 MB/s over local network).

Then its most likely not the network thats the bottle-neck.

Suggest you check cpu usage/io load on storage, and verify syncthings database is on fast storage

Also, speeds might be slow if you have many small files, as there is non-trivial overhead per file in terms of book keeping in the database.

Hm. The Syncthing database is located on an m.2 NVMe, CPU usage is only at about 7-11% per the OMV diagnostics. iotop reports 0.00 B/s disk read and total disk write that seems pretty much in total lockstep with Syncthing (ca. 2.5 MB/s).

The files are mp3s, so mostly 5-10MB with a bunch of outliers. The same files sync via Syncthing at about 7-10MB/s between my Ubuntu desktop and a Raspberry Pi 4.

One thing that I’ve noticed: on the OMV server, the address is my.current.public.IP:22000, and on the Ubuntu PC the address is my.current.public.IP:56046, with the latter port changing every time the Ubuntu Syncthing instance is restarted.

On my router (Fritzbox 6591), I can only forward ports for individual devices, not for the whole network.

Is it possible that the poor speed is because the default Syncthing ports are only forwarded for the OMV device, and not for the Ubuntu PC?

If so, where would I go in Syncthing to ensure it always uses the same (correctly forwarded) ports?

Outgoing connections always use a random port, that is expected.

I am certain that this is nothing todo with port forwarding, as the connection is established and of the right type.

Suggest you try running outside of your container environment to see if it helps. Perhaps the overlay filesystems used by docker have something todo with this.

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