Best configuration to reduce HDD spinups?

Hi, as all my systems now have SSD system drives where the constant access due to database maintenance is not a problem any more, I have finally moved from Resilio Sync to Syncthing.

Besides the small system SSDs on which the Syncthing home folder resides, the computers have HDDs for data. Most of the time, nothing is read or written so I want the HDDs to sleep as much as possible.

If I read everything correctly, there are 4 sources of disk access in Syncthing:

(1) Database maintenance

This is kind of annoying, but not a problem any more since I have the home folder on SSD.

(2) Data on remote device has changed and must be written to the local disk

No-brainer. Required.

(3) Folder Rescan

Leaving Folder Rescan enabled is advised in the docs (which makes sense). My first thought was to use a reasonably long interval (like 100 days) and be fine with a forced spinup every 100 days. However, the actual scan interval would be something between 75 and 125 days (3/4…5/4) per folder, so it will probably happen that if I have 20 folders, each would be scanned after spinup on a different day. This is not what I want.

So in my opinion the best option would be to create a cronjob or systemd timer which fires a curl -X POST -H X-API-Key:yourapikey for all folders, right? In this case everything would be scanned one after the other (I have Max Folder Concurrency = 1) which is what I want.

(4) Versioning Cleanup

According to this commit, versioner cleanup is run on (after) the regularly scheduled scan. It doesn’t run on the various forced or triggered scans.

However, I currently do not fully understand this and its relationship with the per-folder configurable Cleanup Interval. My thought: The Cleanup Interval will tell when a cleanup is required, but the actual cleanup will be triggered by the scan? For example:

  • Cleanup Interval: 1d, Rescan Interval: 30d: Will the cleanup be triggered every 1d independently or every 30d by the rescan?
  • Cleanup Interval: 30d, Rescan Interval: 1d: Will the cleanup be triggered on every daily scan or only after 30d?

Will the cleanup never trigger if I disable the folder rescan and instead start it via API (see (3))?

Not directly an answer to your question, but what operating system(s) and filesystem(s) are you working with?

For instance, I personally use ZFS on my slow spinning disks and due to ZFS excellent in-memory caching (ARC) a syncthing scan doesn’t wake up the disk at all - it’s all cached. So with ZFS I don’t have to specially configure anything, it just works.

1 Like

Hi, I use ZFS only on one machine: My “big” NAS (well… 10 years ago 4x 3 TB was kind of big) that I only power up a few times per year due to its energy consumption and the horrendous energy prices in Germany. On This computer, spindowns are not so relevant. All other computers (Workstations, 24/7 Mini NAS) have a SSD + a single HDD with LUKS encrypted BTRFS. Maybe I will just have to experiment how versioning cleanup and scanning work together. It would also be OK if versioning cleanup is only run on Syncthing startup as the computers are regularly rebooted anyway.

Sorry for kind of pushing this… besides my main question: How do Versioning cleanup interval, rescan interval and their respective trigger work together?

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