Syncthing-Fork slow due to Android filesystem abstraction layer

Hello everyone, i have an issue which i don’t quite understand what causes this and hopefully some of you have a good solution for it.

For the past 1.5 years, i had used the Syncthing app from play store on my Samsung Galaxy A71 due to the fear of the phone stop working and have my pictures/videos backed up to my PC. Fast forward a month ago, i bought myself a Samsung Galaxy S24 Ultra 1TB and weirdly enough, i downloaded the Syncthing app from play store and it installed Syncthing Fork. Upon a google search on what fork is, apparently it’s a better version of Syncthing and the old one wasn’t being supported, and said alright.

Though, the transfer speed on my phone and PC is incredibly terrible, i mean very terrible. The old Syncthing app used to work amazing, transfering like 5GB pictures/videos in 5 minutes or so using the maximum speed that my ISP provides, and now with fork 5GB takes more than 2 hours… The progress of transferring files is very slow, and i check the transfer window to see the progress of each file, and it barely moves. There are times that Syncthing will somehow transfer 20 files at once, and get stuck for 10 mins transferring 10 50mbs pics.

Though, that slow transfer has a negative impact on battery life on my phone. Checking the battery stats on Device Care, it shows an “app” called “Media Picker” and it has used 1.6% battery in the past 45mins. 45mins being in background and the CPU. Last week, that “Media Picker” was terrible, and i remember the stats showing like 6% in 2 hours and was confused. Well to be fair that 6% was because i set up Syncthing for the first time on my new device but still, the slow transfer was still present on first day till today.

I haven’t troubleshooted this as i don’t know what causes this and therefore don’t know what settings to tweak in order to fix that.

Has anyone experienced this and found a solution for this? Or if someone knows the issue I’m having? Thank you tons!

2 Likes

It’s not about Syncthing Fork but your phone and the version of Android it runs. In short, storage access is very slow in Android 11 and newer. This is especially the case if there are many files located in the same folder. Unfortunately, there is no workaround other than reducing the number of files to sync.

2 Likes

Impossible. How did my Galaxy A71 running Android 13 blazed through the transfer every single time?.

I think it’s because that phone originally came with Android 10 and was upgraded by Samsung to newer Android versions later. Because of that, it was still exempted from the current storage restrictions (see https://source.android.com/docs/core/storage/scoped#fuse-and-sdcardfs).

2 Likes

So in that case what do i do? Wait 3 hours for syncthing to transfer 100mb pics and vids and in the meantime it decreases like 10% of my battery trying to transfer those?

Question, is there a way to change a setting in Syncthing to transfer 1 file at a time and not try and transfer 10 at once? Maybe that’s beneficial for both my phones battery and maybe transfer things faster?

There is nothing you can really do as a user :slightly_frowning_face:. I understand the problem very well, because I’ve got one device running Android 7. There, I can sync a folder with 7000+ files in 5 minutes. The same folder requires many hours to sync on much faster devices like Google Pixel 8 or Pixel 9 Pro.

1 Like

Google really destroyed the experience of Android users, they hate us.

One solution exists: switching to iPhone.

Otherwise, don’t you think that the new Linux Terminal app in Android 15+ can circumvent this Android limitation?

Hi,

I don’t sync many thousands of files but my two phones (Android 10 & 15) perform it “fast”.

I am using static IP device config instead of Syncthing’s (default) feature Local Discovery. Local Discovery does not work on recent Android versions because the mechanism is blocked by Android internally. I suspect you ended up with global relay for the transfer on your new phone?

1 Like

Try with thousands of files within a single folder to be sure. I had the speed limitation on LAN with USB tethering.

This Android limitation has been thorougly discussed here:

I rather suggest for anyone to see if the new Linux Terminal app in the developer options has this limitation too despite running in a VM. It has access to the Android download folder in /mtn/shated.

I haven’t tested the new terminal yet. I’ve been running Syncthing inside the shell with ADB, and also via Termux, and there was no difference regarding the slow file access there though.

I just checked, and Android’s download folder is mounted in the Debian VM at /mtn/shared as Virtio-FS and not FUSE. Do you think it can circumvent the known FUSE performance bottleneck, or Virtio-FS still use FUSE at the lower level?

As a user off syncthing-fork I wanted to help test

I was able to get 10-20MB/s download rate on my phone (poco x5, android 14).

I used a single ~2GB file for testing. Phone and PC where using relay wan to communicate.

1 Like

Thanks nware, but you should have at least 1000+ files in the same folder to do the speed test, not one file.

Read more about it here: Scoped storage  |  Android Open Source Project

Suggestion for topic title: Syncthing-Fork slow due to Android filesystem abstraction layer

3 Likes

My bad I should read better. I tested again. but created 2000 .txt files in the same folder. let those .txt files sync. (wasn’t fast but expected with just quantity off files)

then I added a ~2GB file again. with that I can only read upto 3MB/s this time with a combination off tcp lan and relay wan.

in the same folder with the 2k txt files. I added a 2gb file on the phone. to check its upload speed. Which seemed to not be affected at all I reached upto 30MB/s

I cleaned up the 2k .txt and added a big file again and then I got a upload speed off also 30MB/s with some spikes above that. But I see that as margin off error & also the inconsistency off wifi

tl;dr In my case. When an android device has more than 1k files in a folder the download speed lowers from 20MB/s to 3MB/s

Upload from the android device is not affected by the amount off files in the folder.

If I can help test anything else let me know.

1 Like

Try this ADB command, it certainly helped me with Syncthing Fork not being able to use the “Watch for changes” feature due to Android’s abstraction:

adb shell cmd appops set --uid com.github.catfriend1.syncthingandroid android:legacy_storage allow

I’m not sure if that helps in your case but who knows.

That’s great ain’t it…

Switching to iphone? Helll noo

Hmm interesting.

Well i have let the default settings on both Syncthing phone and PC since the default settings worked flawlessly on my old A71, and i thought the same thing was gonna happen to my S24U, but nah.

Could you please further help me on how to change to a Static IP on Syncthing? I think it’s easy to find, but lemme know so i don’t search for 5 mins on where’s that haha

Well my main DCIM folder that is synced has 12K pics and vids averaging 160GB, but apart from that, i have 6 more folders that i sync and they are from 70MB upto 30GB. But still, that wasn’t a problem before