Folder priorities / dynamic throttling

So, not necroing. Folder priority Folder Priorities - #3 by AudriusButkevicius

Folder priorities would be nice. If I have folders with more critical 1G of unsynced beans, I want them to be synced with priority, throttling the 1T background chugger folder. Actual network speed is 5-6GB/hr

Since the 1T folder has been (already) chugging along, it tends to take priority. It’s annoying and creates sync conflicts, if the smaller / more frequently changed folders get bogged down. I tend to manually go in and pause the syncs (what risks forgetting to unpause and lose progress / wastes potential bw usage).

I’d propose¹ implementation in ± two steps:

  1. Allow throttling folders.
  2. Allow throttling folders percentage-wise, of available bw (howto determine it? one thing is of device-wide bw limit, but what about local devices, and it’d be better to look at the total bw, and attempt to restrict there; with units it’d be for each byte x syncs, you should be prioritized to sync/request kx bytes; what about syncs being stuck, and them not using their allocated bw?)
  3. Allow setting units (where from percentages are found, or not) to folders.

¹ I might be motivated to implement it at some point in time, but not taking any commitment or assignment :wink:

ok isn’t this another one of the “world could be better, but hey, see it, it isn’t, and it’s not going to, ain’t it?”

3 Likes

Internally in Syncthing folders are just threads (-ish) who throw requests at available connections to other devices. So absent data that points in another direction I’d presume that two syncing folders will get roughly 50% each of the available I/O and network capacity. That is, I think things should be fair by default.

(There are of course details; larger files use larger blocks, so given equal shares of requests the larger file will consume larger amounts of available bandwidth and I/O resources for the responses. Perhaps this is what you’re seeing.)

4 Likes

Perhaps take the existing global bandwidth limiter and allow it to be set at the per-folder level?

2 Likes