This worked just fine for me. Just another data point…
rsync and btsync are working far better then syncthing regarding the hashing algorithm. I just takes too much performance. Rsync checks the files in minutes… syncthing takes days for the same work.
I believe this is because rsync uses the Adler-32 rolling checksum while Syncthing uses the SHA-256 cryptographic hash function, which is much more CPU expensive. Check the FAQ:
I can’t see the advante of sha256 for hashing? The traffic between two nodes in encrypted… as far as I understood it, hashing is not relevant for security?
Please read the docs on how the protocol works. We ask for content based on hashes, hence we rely on not being able to have hash collisions, which is what cryptographic hashes provide.
I’ve been letting Syncthing run on my Pi for about a week now. It’s got ~150GB of data to index. Some large files and many small ones. I expected it would take a long time, but I wonder: if I kill the process or the system crashes, do I lose all the work up to that point? Or is the index saved as it progresses?
How long do you think ~150GB of data would take to index on the Pi?
My Pi has been running at 99% CPU for the entire week
You will need about 2 weeks I guess
just found that there is a parameter for windows called “/low” Is there a similiar option for linux?
you can start syncthing with
nice -n <niceness> syncthing where
<niceness> is any positive number- the higher the number, the lower its priority- To change a running process, check out renice.
Personally, on my RPi, I have a repo worth 400GB, took me “just” about 3-4 days to initialize I think.
I had 50Gb and this alone took a week (RPi B+)
I still have severe problems on the RPi. You told me I have to wait for the message:
INFO: Completed initial scan (rw) of folder xxxxxx
This has happend for all my folders. Nethertheless I am waiting since hours for some small files to be synced. There is no network traffic from syncthing. The cpu is alwys near 100% due to syncthing. How can this be? All folders scanned completly but still near 100% cpu load and no sign of sync the files?
@theincogtion It is probably still indexing your files. How much data is it? It also helps if you close the webgui because this will speed up the other tasks we are doing.
All in all I have 80GB. The webgui closed. I just open it temporary.
I’ve been using it fine on a RPi2, I tried it first on a RPi B+ and unfortunately it seems the hardware is not up to the task. Something you could try is to run syncthing and “htop” and give a look how much memory syncthing is using, if it’s too much you’ll have problems… there is a new command-line option to limit memory usage iirc.
100MB still free
I still think you’re running into memory limitations. This means indexing will be extremely slow and can take forever…
- If you don’t use the graphical capabilities of the Pi, reduce the size of the VGA memory http://raspberrypi.stackexchange.com/questions/673/what-is-the-optimum-split-of-main-versus-gpu-memory
- You need to at least enable a little bit of swap memory http://raspberrypi.stackexchange.com/questions/70/how-to-set-up-swap-space
I have 36GB of data synced on my raspberry pi model B (512MB) and it works pretty well with a self made build used on all my devices (see https://github.com/syncthing/syncthing/issues/1751). It’s slow but it works and memory usage is usually under 100MB with GOGC=50 environment variable set.
Maybe you have the same problem that devices lose connection often because of ping timeout? This also keeps the CPU usage at 100% the whole time without any syncing happening except index exchange. Even after the connection is lost it stays at 100% for some minutes.
Very good point, I think the index exchange is quite CPU expensive indeed.
I lowered the GPU Ram and added 1GB swap. Result:
Still 100% cpu load
Can you check the log for the follow message:
Connection to … closed: EOF
[MVWYV] 2015/06/16 19:38:45.649657 model.go:711: INFO: Connection to XXX-U5XVXA5 closed: EOF [MVWYV] 2015/06/16 23:53:05.456518 model.go:711: INFO: Connection to XXX-V7BTPAP closed: EOF [MVWYV] 2015/06/17 07:27:38.107835 model.go:711: INFO: Connection to XXX-U5XVXA5 closed: EOF
How can I edit the init.d script to let syncthing write logs?
This is not working:
start-stop-daemon -b -o -c $stuser -S -u $stuser -x $DAEMON >> /etc/syncthing/syncthing.log