High CPU load on S4

I’ve turned off global and local discovery, and I’ve tried setting it to sync only when charging, but Syncthing always use 30-45% of CPU time. When I check its task’s CPU usage with 3C Tools, it always shows Syncthing’s CPU percentage as low (<1%), but by phone’s total CPU usage is 30-50%. As soon as I exit Syncthing (when I have it set to manual stop and start), my total CPU usage drops back down to its normal 3-7%. So Syncthing is clearly doing something to cause high CPU usage: the phone gets hot and the battery runs down quickly.

Is there anything that can be done to fix Syncthing’s very high CPU usage? It’s particularly important because manually starting and stopping the app is quite impractical: the first launch is normal, but after that, the app takes forever to launch, putting up the “Waiting for API” message for quite a long time so that I usually have to reboot my phone just to get control of the app again.

It’s most likely indexing, which is an expensive process. Once that’s done it should settle. You can also increase the rescan interval, though I think the android app uses inotify hence shouldn’t be a problem. Do you have 2 android devices part of the cluster by any chance?

Just one Android device with ST installed (my S4). Perhaps it’s indexing, but there’s never any rest period. Since it’s set to sync only when charging, I would think that it wouldn’t sync when not charging–that’s the whole battery saving strategy. I’m syncing about 17,000 files in about 2200 folders (about 18GB total), which is a lot, but hardly an outrageous amount of content.

Well we have to hash the 18gb first, and that could take some time. 18gb on a phone is quite a lot.

You can check the web UI to see what it’s actually doing.

Well, yeah, but this is long after it’s finished the first sync and transferred all the files. I’m getting massive CPU consumption even when there are no changes to sync. Are you saying this is expected and normal behavior for ST? BTS and Dropbox using Dropsync average under 10% under the same conditions and average 0% when a network or power condition isn’t met, i.e., when there’s no WiFi available or the phone’s not charging. ST, on the other hand, pins the CPU constantly in the range of 30-45% with no break.

After the initial indexing is done and no transfers are taking place, I don’t think it should consume any CPU. I guess you need to look at the logs to understand what’s happening, because I am clearly not exhibiting this behaviour myself on my phone.

But then again, I am merely syncing 80mb or so.