This does lead to dangers of file loss if the file exists in multiple different cases on a case sensitive system, but just curious to see if this helps in any way.
Sorry I can’t see any clues in there, just that it seems to be a really small sample? Hope somebody with better Go knowledge can make sense of the numbers.
Thank you Audrius, this improved the situation so from ~160KiB/s I am at ~1MiB/s. But I do not plan to use something what is not safe so I am back at the option disabled.
I did couple of tests on the HDD storage and on dedicated SSD (usb c), both using case insensitive apfs.
1GB on the volume - unable to measure as it completes almost instantly.
10GB on the volume - ~5MiB/s on HDD storage and ~160MiB/s on SSD.
20GB on the volume - ~200KiB/s on HDD storage and ~150MiB/s on SSD.
300GB on the volume - ~160KiB/s on HDD storage and ~50MiB/s on SSD.
I do not have enough disk space to test it on internal SSD but I assume the external SSD provides similar results.
All the volumes are excluded for Spotlight and the Spotlight is disabled on my system (so no indexing of the files is happening).
Any THROTTLED as far as I know means that the MacOS is throttling resource heavy processes for idle applications. Why the Syncthing is considered as an idle application I have no clue, the developers can probably answer and fix this.
How to temporary fix it?
Prior folder scan you can run:
sudo sysctl debug.lowpri_throttle_enabled=0
To enable the throttling again you run:
sudo sysctl debug.lowpri_throttle_enabled=1
You can as well run
sudo sh -c 'echo debug.lowpri_throttle-enabled=0 >> /etc/sysctl.conf'
to disable the throttling on your system completely (no clue what will be the long term impact).
With disabled throttling the scanning performance is in my case ~270MiB/s (the value 8 for Hashers seems to be good for my storage).
Syncthing lowers priority be default; there’s a setting to disable it too (Advanced → Options → Set Low Priority). It doesn’t usually have this drastic of an effect though, so still not sure what’s going on with this system. Perhaps it’s heavily loaded in some way so the OS things it needs to throttle everything nonessential?
I tried to enable the Set Low Priority option but it had no effect on the performance. During the time I reported the behaviour I had running messages, mail, terminal (mc), Chrome and Signal so nothing CPU/IO intensive (90%+ CPU idle). Any energy saving is turned off on the system.
How do you start/install Syncthing on the Mac? Any chance that some wrapper/task-manager/… is setting any funky flags (I have no idea about macos, thus the very non-specific questions ).
Well, the Syncthing application is for whatever reason sleeping the majority of the time. The I/O is not the issue here, even if I run Syncthing as a single application (no other applications running, nothing in the tray) the performance is in KiB/s while the storage provides xxxMiB/s. Disabling throttling is resolving the issue so the I/O is definitely not an issue. Why the macOS thinks that Syncthing should be throttled I have no clue.