Syncthing reads my hard drive eat insane speeds and with such high priority that it renders my computer inoperable. Last night my computer wouldn’t respond to any clicks and for many moments the mouse seemed to freeze.
When I opened the task manager I saw that Syncthing was pushing my hard drive at 100% non-stop. I thought I’d leave it on and see if it made any progress. After three hours my computer froze, absolutely unresponsive. The folder it scans is one where I have video files that are around 1GB.
Is this behaviour recurring? What can I do?
It’s a first time time thing; files need to be read and hashed. I suspect the freeze in this case is due to using too much memory, which is something we can probably do something about. This is a folder consisting exclusively of large files?
If so, there’s two things you can do. The first needs to be edited into the config file (there is no graphical setting for it unfortunately),
config.xml. Inside it you’ll find one or more sections like this:
<folder id="default" path="~/Sync" ro="false" rescanIntervalS="60" ignorePerms="false" autoNormalize="false">
Here you should change
<hashers>1</hashers>. This will limit the number if parallell hashing routines to one, from the default of however many CPU cores you have.
The second thing is if you could please try this build: http://build.syncthing.net/job/syncthing/1001/artifact/
It should reduce the memory requirements for your scenario a bit…
Thanks for the quick reply! I’ll try this out tonight after work and post back. Should I implement both suggestions or just one? I’m leaning towards giving the new build a try.
Ok I tried both options. I changed hashers from 0 to 1 for all my folders and also ran the new executable you linked me to.
The computer was slightly lighter, but the program was still hammering my hard drive. Even if it was using 1 CPU (I have an Intel i7), there was still a heavy slowdown.
Here’s a snapshot of the task manager. Programs colour the cells darker depending on how many resources they use up. I’ve never seen a program go dark red like Syncthing. And it’s not because of a high number, sometimes it reaches 60MB/s and stays bright yellow.
Could it be that the hard drive can’t handle the workload? I’ve never had this problem with BTSync or Dropbox,
Keep the (web)gui closed and report your findings
The web ui should have no effect on scanning speed.
I feel that the disk is just too slow.
Regardless, this is a one-off thing, which once completed shouldn’t happen again (unless you upgrade between 0.10 and 0.11)
I wanted to try and figure out if this hard drive cap was persistent on all of my PC, or if ti was only because of Syncthing’s method of scanning. So, I uninstalled BTSync 2.0 and installed 1.4. There was a great deal of files that started syncing and I took this snapshot:
Computer seemed slightly unresponsive but it only lasted half a minute, after that the hard drive usage dropped slightly and the indexing process continued but I couldn’t notice a toll on my system.
I’ll let Syncthing scan my computer again today and report back, just for good faith
Just for the record, there’s nothing special we do to hammer things harder than anyone else. We read files and compute hashes. Without adding artificial delays this will be limited by something - sometimes it’s the CPU, sometimes the hard disk. Setting the number of hashers to one disables multithreading in that piece of the code, which moves the bottleneck closer to the CPU instead of the disk. Still, the files need to be read and that’s the same amount of disk thrashing no matter who does it…