Syncthing on Raspberry Pi

I have been using btsync for a long time between my Raspberry Pi and my laptop. I transfer files from my Raspberry Pi to my laptop at a rate of approximately 2-3 MBps.

I have installed Pulse and is very pleased with the structure and the opportunities and would like to switch to Pulse. BUT the speed between my Raspberry Pi and my laptop is only 0.4-0.8 MBps.Compression is off.

Can I do anything to get the same rate?

PI running Raspbian and Laptop running Ubuntu 14.04.

How’s the CPU load and RAM usage? I don’t think that’s the bottleneck though, but perhaps it gives away some issues. Also, there was a report that the transfer speed drops a lot when the GUI is open, so try running without a GUI.

I run the program without a GUI. CPU Usage Monitor shows that the CPU uses 100% when I transfer using Pulse. Ram is about 15 MB.

Can you try and increase the rescan interval to something large? How big is the folder?

At a guess you are being limited by the fairly heavy encryption that syncthing/Pulse does. BTsync doesn’t do that, for good or worse…

I’d be surprised that the TLS layer on that thing caps the transfer at 0.8Mbps.

Maybe? We do nail TLS down to the better (i.e. more expensive) ciphers. I don’t know what else it would be. :slight_smile: A profile could narrow that down of course…

I’ve tried to set it up to 600, no difference.

If you check the -help options, there are instructions on how to run profiling. Can you run it with profiling for a while and see what’s causing the high CPU load?

Does this mean that the program uses stronger encryption than btsyncs’s AES?

Ok, I will try that right now.

We use AES128. I don’t know what btsync uses - maybe they have a better implementation of it than we do, maybe @AudriusButkevicius is right and the CPU usage is not caused by the crypto. Profiling will provide the answer!

btsync is also using AES128.

Ok, I have looked at the -help but what is it exactly I need to write after the ./syncthing in the terminal to get the profiling? I have tried ./syncthing STCPUPROFILED but I can’t see a file after shutdown.

Run STCPUPROFILE=yes ./syncthing

I’m only getting a empty (0 byte) .pprof file…

Strange… Are you running it for a while, are you exiting gracefully?

The file is written when syncthing exits. Select restart or shutdown in the menu after doing something representative to cause high CPU.

Runnng for 5 minutes then opening GUI (browser) --> shutdown…

Empty file.

I use pulse myself on an rpi, and have no problems with transfer speed. Currently I’m downloading from it with 2.4 Mb/s, upload is also fast.

No special setup, but I set scan interval to 3600 (1 hour). CPU usage is currently at ~30% during transfer.

The only bad thing is that the web GUI is incredibly slow (and uses ~90% CPU and slows downloads).

Edit: How many folders and (connected) devices do you have?