Problem
The macOS wrapper currently launches the managed Syncthing process with
Process.qualityOfService = .background.
On a Mac with a large Syncthing folder, this can make full folder scans much
slower than expected:
- macOS 15.6, Apple M2 Max
- Syncthing v2.1.2
- about 393,000 local files and 81,000 directories (107 GB)
- full scan through
POST /rest/db/scan: about 604 seconds with background QoS
CPU, filesystem, ignore patterns, Syncthing's setLowPriority, GC behavior,
SQLite query plans, and database size were investigated without explaining the
slowdown. Rebuilding the wrapper with .default QoS made the scan dramatically
faster in normal use. .utility is also fast enough on the same system while
retaining reduced resource usage.
This is separate from Syncthing's setLowPriority option. That option changed
the process nice value but only changed the measured scan time by about 5%.
Proposal
Add a preference for the managed Syncthing process QoS:
- Normal (
QualityOfService.default)
- Utility (
QualityOfService.utility)
- Background (
QualityOfService.background)
Changing the preference should restart the managed Syncthing process, as the
QoS is applied when the process is launched.
For compatibility, an unset or unrecognized preference should continue to use
Background, preserving the current behavior for existing installations.
Additional context
This preference would keep the wrapper's current low-impact default while
giving users with large folders a way to avoid severe background scheduling
throttling. A draft implementation and further real-world testing will follow.
Problem
The macOS wrapper currently launches the managed Syncthing process with
Process.qualityOfService = .background.On a Mac with a large Syncthing folder, this can make full folder scans much
slower than expected:
POST /rest/db/scan: about 604 seconds with background QoSCPU, filesystem, ignore patterns, Syncthing's
setLowPriority, GC behavior,SQLite query plans, and database size were investigated without explaining the
slowdown. Rebuilding the wrapper with
.defaultQoS made the scan dramaticallyfaster in normal use.
.utilityis also fast enough on the same system whileretaining reduced resource usage.
This is separate from Syncthing's
setLowPriorityoption. That option changedthe process nice value but only changed the measured scan time by about 5%.
Proposal
Add a preference for the managed Syncthing process QoS:
QualityOfService.default)QualityOfService.utility)QualityOfService.background)Changing the preference should restart the managed Syncthing process, as the
QoS is applied when the process is launched.
For compatibility, an unset or unrecognized preference should continue to use
Background, preserving the current behavior for existing installations.
Additional context
This preference would keep the wrapper's current low-impact default while
giving users with large folders a way to avoid severe background scheduling
throttling. A draft implementation and further real-world testing will follow.