syncthing / syncthing/syncthing

Syncthing for Mac doesn't consider purgeable space as free

Open
#10,627 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

enhancement
Dominant language
Go
Stars
88.8k
Forks
5.5k
Avg merge
2d 10h
Merged PRs (30d)
5

Description

What happened?

I'm running a larger copy operation in my home network, and frequently, Syncthing v2.0.14 on my MacBook Pro M4 (MacOS Sequoia 15.7.5) will stop synchronization with the following message:
syncing: insufficient space in folder "(folder name)" (5qgr2-yj9iv) (/Users/jan/Sync/(folder name)): current 10.6 GB < required 29.0 GB

However, when I ask Finder how much free space I have, it reports back a significantly higher number (in my case, ~96 GB -- enough to copy over that file).

After some research, I found out that it looks like Syncthing looks at free space the same way that the "df" CLI tool would, which reports for me:

> df -l -h .
Filesystem      Size    Used   Avail Capacity iused ifree %iused  Mounted on
/dev/disk3s5   926Gi   896Gi   8,5Gi   100%    1,9M   89M    2%   /System/Volumes/Data

On deeper inspection, I found that there is a concept in macOS called "purgeable space", i.e. space that macOS reports as free in Finder, as not free in df, and will only actually be made available once macOS recognizes the need by itself.

You can view the difference in Finder's HD Info screen:
Image

That leads to some weird workarounds where users create large empty files on the command line until finally macOS gives way and purges the space, because there doesn't seem to be a way to force the OS to purge.

So I hope Syncthing can find another way of measuring free space in macOS, or maybe somebody even figures out how to force the OS to do a purge.

Syncthing version

v2.0.14

Platform & operating system

macOS arm64

Browser version

No response

Relevant log output

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reproducing the discrepancy on macOS arm64, comparing Finder's reported free space with the value from df during a large synchronization. Trace where Syncthing determines available folder space and investigate macOS's purgeable-space reporting. Done means synchronization can safely account for space macOS can make available, with behavior verified on the reported setup.

Written by the indexing model from the issue text.

Assessment

Tech stack
go, macos
Domain
operating-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Active
Clarity
Mostly clear
Newbie friendliness
52/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.