I currently have syncthing 1.5.0 ARM installed on Raspberry Pi 1 b+ with 512M of RAM and I am trying to sync 800k files about 1Tb in size. I have had it running for 5 days and syncthing is already using 1.7Gb+ of RAM. The webui is super slow (takes tens of minutes just to load some basic info) and I can’t see what it is doing. The other clients can’t connect to it because of i/o timeout errors. The CPU usage is less than 10-20%, probably because it is waiting for io and swap.
Is it normal for syncthing to use that much ram during scans or syncing? I had it running for half a year now and at some point it was (slowly) managing to have about 700Gb of files in sync, but things broke in the last 2 months or so (and I have added about 270Gb of data since) and now it doesn’t look like it is working at all even after leaving it alone for weeks. By the looks of things, it had managed to sync 3 smaller folders and is struggling with a large one with 900Gb of data. I have database tuning set to small (and db is about 500Mb in size) and I have changed all folders to random sync order.
I recommend Max Folder Concurrency = 1, which helps a lot during initial scan. It cut my “startup” scanning (~2 million files) time from ~3 hours down to 1 hour
For this phase you could use the API to get just the information you need:
Get folder list with /rest/system/config and loop through folders to get status with /rest/db/status?folder=<folderid>
Also, it now throws no connected device has the required version of this file errors, but it can’t connect to other clients because of TLS handshake timeouts. Is it somehow possible to increase the timeout interval?
I must say though that the memory gains may not be great. In my case, I have two devices with the same folders synced. One of them has been optimised for low RAM, while the other uses the default settings. The RAM usage difference between them is barely noticeable, i.e. maybe 5-10 MB at best (70-75 MB on Device A vs 80 MB on Device B).
Thank you for the suggestions. If nothing major could be changed in Syncthing and things work as intended, I guess I’ll just wait for another week(s) to see if it finishes
I have also tried changing some swap settings and now things seem to work a bit faster.
Also, should I expect the RAM usage to climb back down after the syncing finishes?
Wow, I didn’t expect it to make much difference, but after applying everything it has managed to finish scanning in just about 7 hours (whereas it would crash after several days before) and is now syncing everything. Other devices do not timeout anymore and it is using about 800mb vs 1.7gb before.