Quantcast
Channel: Syncthing Community Forum - Latest topics
Viewing all articles
Browse latest Browse all 6194

Syncthing on RAMDISK/mergerfs to avoid constant HDD/Flash writes?

$
0
0

Hi Community,

I’m starting another attempt to move from Resilio Sync to Syncthing. Resilio works really well, but I’m not sure whether it is still alive or has been abandoned. There has been no update for quite a while and the forum is dead. Furthermore I like Open Source software and its great community better and therefore would prefer Syncthing.

Anyway, there has been and still is a big show stopper for Syncthing: It constantly writes to its database even when no sync is taking place. The reason is mainly the last seen timestamp which is written each and every minute and the connection duration when another instance disconnects. I’m not sure whether Syncthing needs this precise tracking but I don’t care about it and wonder whether it would be possible to disable it or significantly increase the interval.

The undesired impact of these constant writes is that:

  • if the database resided on a HDD, it never spins down
  • if the database is located on some flash storage, it wears out the media

Both are things I absolutely don’t want so I‘ve been considering a workaround but I’m not sure whether it would work. This would be my daring attempt:

  • Create a mergerfs with /hdd + /ramdisk > /syncthing-db and configure this mergerfs to create new files on /ramdisk
  • Run syncthing which will create all new database files (ldb and log) on /ramdisk
  • cyclically (of course longer than the HDD’s spindown timeout)
  • – (if HDD running): backup /ramdisk to /ramdisk_backup_on_hdd
  • – (if /ramdisk usage exceeds limit): stop Syncthing, move /ramdisk/* to /hdd/, restart syncthing. It will push the merge-tree .log into one or more ldb files and create a new merge-tree .log to which it writes.
  • After Syncthing shutdown, move /ramdisk/* to /hdd/

Note: For the initial sync I would of course keep everything on the HDD as /ramdisk would fill up much too quickly.

Would that concept probably work or is there a better way? Of course there will be some more details to consider - especially what happens if the machine crashes. A sudden power outage is quite unlikely as 3 machines are connected to an UPS and 1 is a laptop with battery.

7 posts - 4 participants

Read full topic


Viewing all articles
Browse latest Browse all 6194

Trending Articles