Low sync speed Android 14 to Synology NAS

I’m syncing files from my Android 14 phone to my Synology NAS. As these are large files (partitions backups made in TWRP) I discovered that speed sync is around 7-times slower than my local WiFi. So I have 1 Gig/s LAN network with WiFi 6a 5GHz and iPerf shows me that between my phone and NAS there is a throughput around 725 Mbit/s:

but Syncthing-Fork is sending files at speed around 100 Mbit/s (11-13 MB/s) so it is 7 times slower then what iPerf measured:

Both Syncthing ends are configured in the same way: NAT Traversal, Local Discovery, Global Discovery, Relaying are enabled.

I tried to disable all except Local Discovery but it seems that the issue here with discovery by broadcast in Android new versions is not resolved: Remote device disconnected - #2 by acolomb

1 Like

Please open the Web GUI on Android (available from the left slide-out menu) and check what kind of connection is used under the specific remote device. If unsure, a screenshot is always welcome.

Please also keep in mind that speed in the case of Syncthing depends on the hardware as well, as it does more than just sending files in plain form, so you may want to check the resource usage on the NAS too, especially the CPU and I/O, as they may be pegged.

Relay WAN connection :frowning:

Apart of the pair Android → Synology NAS I have few other devices configured to syncing files to the NAS, like my laptop and here it is TCP LAN connection type so I don’t know why for Android → Synology NAS it is WAN.

Connections Priority is default so it should be LAN used but it isn’t:

Synology NAS is powerfull. It is DS920+ model. CPU and memory usage when transferring an 11GB file from Android to NAS is very low, the increase in usage compared to idle state is almost unnoticeable. The same is for Android phone. It is Samsung Galaxy S22 Ultra.

Yeah, this is surely the culprit. Please check if firewall isn’t getting in the way between the two devices. You may want to try hard-coding the IP address or hostname of the NAS on Android (or the other side) and see whether the two can connect with one another. If they cannot, then this means that it’s likely the firewall (or possibly router configuration, such as network isolation or similar).

Alternatively, it may due to local discovery not working on Android, but global discovery should still help with the connection.

In sum, I would try to hard-code the hostname (or the IP address) as follows first.

image

When testing, make sure that you disconnect and reconnect the devices (e.g. by pausing and unpausing them), as Syncthing won’t switch the connection to a better one right after editing the configuration if it’s already established.

I finally managed to configure it so that the transfer from Android to the NAS goes only via LAN:

On the destination end (Synology NAS):

On the source end (Android 14 phone):

My trials with different settings are showing that Global Discovery is a must be enabled.

Finally transfer from the phone to Synology NAS is going like this:

instead of how it was:

1 Like

SH…T !!!

It stopped working. Can’t get connection Android 14 ↔ Synology NAS if “Enable Relaying” is disabled and if in “Sync Protocol Listen Addresses” is set to tcp4://0.0.0.0:22000, tcp4://:22000.

It used to work for a while, then I changed absolutely nothing and when I restarted Syncthing on Android 14 phone it is permanent Disconnected status.

It has to be something with discovery problem:

I’m stuck.

I don’t even know in which device there is a problem.

If it would be Android 14 then why it connects using LAN with laptop when both are on WiFi?

If it would be Synology NAS then why laptop connects using LAN?

And why laptop connects with Android 14 using LAN?

Is anyone able to explain where the problem is?

[EDIT] Looks like local discovery on Android 11+ still doesn’t work even that Syncthing-Fork developer released long time ago a version that supposed to fix this issue: https://forum.syncthing.net/t/local-discovery-problem-on-android-11/16093/18

How are you running Syncthing on your Synology? In case it’s Docker, you should switch your container to host networking mode. Otherwise you’ll end up with two nodes which can’t determine their own LAN IPs.

Yes, I do. Its running in Docker on Synology NAS. But I have no clue how to “switch container to host networking mode”

Is it a matter of container capabilities settings?

https://kb.synology.com/en-in/DSM/help/ContainerManager/docker_network?version=7

This document says how to create new network by pressing Add button. Nothing else. So it is useless. All containers are configured by default to use bridge:

but I don’t know how to switch to Host. If you know then provide clear steps.

But I doubt this is the root cause. If it would be then how do you explain that other Syncthing device - my laptop is able to connect to Synology NAS using Local Discovery only (second pair presented on my screen with Excel spreadsheet) ?

It’s enough for one side to discover and publish its own LAN IPs. The combination of bridged Docker and Android is known to cause problems because Syncthing can’t see the interface IPs on either side.

OK, finally I made it.

Indeed as @bt90 wrote: when Syncthing is running in a docker then it makes it confused when it is running in the network outside the “native” network.

In my case Syncthing was assigned to default bridge network 172.17.0.0/16 and therefore local discovery was failing on Android.

What I did is the following:

  1. Installed portainer in Synology: Synology: 30 Second Portainer Install Using Task Scheduler & Docker – Marius Hosting
  2. In portainer console I added additional network naming it “native” that is outside the scope of my local DHCP on router. So I created network 192.168.1.200/29 with gateway 192.168.1.201 and joined Syncthing container to this network:

  1. Finally my Android is connecting with Synology NAS using Local and Global discovery only and the Connection Type is TCP LAN:

I hope someone else would find this solution helpful.

Thanks @bt90 for your help and suggestion.

3 Likes

[UPDATE]

If there is a configuration on Syncthing running in docker to listen on particular IP address then it have to be “virtual” IP of the Syncthing docker but not the “real” IP of the host in which docker is running.

In my case:

Syncthing in docker has IP 192.168.1.202

Synology NAS has IP 192.168.1.199

Originally I have a configuration in Syncthing to listen on 192.168.1.119 but I realized it is not running so I had to add 192.168.1.202:

And as it is visible above Syncthing is listen on 192.168.1.202 but it doesn’t on 192.168.1.119. Soon I will remove 192.168.1.119 from the list.

@Catfriend1 : hello man! I see you liked my post. Can I ask if we could expect an update for Syncthing-Fork?

I really prefer using your fork than the official one on my phone.

All the best!

Yes, you can. But no schedule. I currently work on resolving a build problem so we can do fdroid builds again.

1 Like

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