Syncthing Storage Growing Exponentially

Hello all,

I have Syncthing (v1.18.1) running in a TrueNAS (v. 12.0-U8) jail based on FreeBSD (v. 12.2). I also have a dataset in my mainpool dedicated to Syncthing and mounted into the jail.

Using Syncthing, I want to sync the Documents and Photos folders on my Mac Mini, along with an external drive I use for the project I’m currently working on.

I was able to set all of this up with no problems, until I noticed that TrueNAS was reporting the Syncthing dataset was growing way beyond what I imagined to be a normal amount of disk space. For example, all of these folders should have equaled 900GB. However, TrueNAS was reporting that the dataset had ballooned to over 4TB.

So, I deleted the syncthing dataset, removed the synced folders from Syncthing running on TrueNAS, and started again this time just adding the Photos and Documents folder. Note: I did not reinstall Syncthing. But it happened again. Below are the storage totals of both of those folders:

  • On My Mac: Documents + Photos: 252.19GB
  • Syncthing Dataset (via SMB): Documents + Photos: 251.63GB
  • TrueNAS Syncthing Dataset (Currently): 1803GB (1.64TiB)

So, where is the other 1552GB (1.6TB)? I don’t have any file versioning enabled.

Can you post screenshots of the Syncthing Web GUI on all devices?

How much space does the database take? You can check if you’re unsure about its location, as it differs depending on the OS.

Also, you’re probably aware that Syncthing creates temporary files during synchronisation. If the transfer is interrupted for some reason, those files will be left on the disk for 24 hours (by default). If you deal with very large files, those temporary files can take quite a lot of space too.

Please explain how you check how much space the data takes on the TrueNAS. If it’s e.g. a btrfs filesystem, the usual tools (df) might overreport space usage. I could see how the frequently updated db causes lots of writes and thus copies → tons of allocated blocks (which aren’t really in use though).

Temporary files can in an unrealistic worst case scenario cause 2x the real disk usage (if every file both exists “real” and as a temporary file) - the space reported here is clearly way above that. Also the database cannot take more space than the entire data.

Attached is a screenshot of MacMini-Syncthing (Syncthing running on my MacMini) which shows that everything is up to date.

Then there is TrueNAS-Syncthing (Syncthing running in my TrueNAS jail) that shows the Documents folder is up to date. But, the “Pictures” folder is "Syncing (0%, 228GB) and has 228GB left to sync. Meanwhile, the SMB share is reporting that folder has a contents of 216GB.

Lastly, I haven’t been able to find Syncthing config file within the TrueNAS jail but I will keep looking.

I’ve also added a screenshot of the syncthing dataset line in the TrueNAS pool management.

Update: TrueNAS is now reporting that the Syncthing dataset is using 1.98TiB which is up .32TiB from two days ago.

Anyone have any ideas?

Please check what @imsodin wrote above about the filesystem space usage and allocated blocks. If Syncthing itself reports the data size correctly, the problem is likely on the operating system (and the filesystem) side of things.

Ok then, I’m going to try deleting the jail and the dataset and try it again.

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