High CPU usage when remote folder disconnected

Hi there,

I am noticing very high CPU usage when the remote folder a PC is syncing from is disconnected, and there are files left to sync.

  • I.e., I have Computer A syncing to Computer B.
  • Computer A is turned off mid-sync, with lots of files still left to sync.
  • Computer B’s Syncthing CPU usage ramps up from around 4.5% to 35%, and stays there, while it reports all the files missing (which can be for a very long time when there are a large amount of files left to transfer).

Is this expected behaviour? Or is this a bug?

Many thanks.

This is expected, to me at least. It built a queue of files to sync; it’s trying to sync them, realising for each that they are not currently available. It’s possible that there could be some optimisation that if it’s no longer connected to any device it can just abort syncing because it’s impossible to make progress, but in the general case we don’t know from where a file may be available until we look. (It may also be available without any devices connected at all, if it consists of just blocks found also in other files – then we can in fact sync the files without being connected to anyone else… but this is a corner case.)

1 Like

@calmh Ah, great, okay. That is what I suspected might be the case.

I think what I was thinking would happen is similar to what you said - if it sees the device is disconnected, I would think it would stop trying to sync.

In my case, the folder is not available from anywhere else, so I would expect it to stop trying to sync the files.

Thanks for the explanation!

1 Like

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.