Why macOS Daemons Slow Parallel Worktrees and How Caisson Shields Them
Controlled Apple Silicon benchmarks across .noindex, sparse disk images, and a daemon-shielded sibling APFS volume, plus the hidden 52x syspolicyd exec tax.
If you run parallel coding agents or multi-worktree builds on macOS, you have probably felt your laptop fans spin up while a simple git worktree remove hangs for ten seconds. The culprit is rarely your SSD. It is macOS background daemons (mds_stores, fseventsd, and Time Machine) chasing every file write across hundreds of thousands of short-lived build artifacts and node_modules entries.
Before writing Caisson (OSS-01), we ran controlled A/B benchmarks on Apple Silicon to test the common workarounds people recommend online. The negative results were just as important as the winning design.
What Did Not Work
Across a 12-worktree + 15k small-file write storm on Apple Silicon APFS:
| Storage Strategy | mds_stores CPU |
Total Daemon CPU | 15k Small Files | End-to-End Wall |
|---|---|---|---|---|
Main APFS (/) |
7.80 s | 36.93 s | 0.58 s | 28.36 s |
Main APFS + .noindex |
7.49 s | 37.82 s | 0.57 s | 27.15 s |
Shielded .sparseimage |
2.33 s | 18.51 s | 3.65 s (6.7x slower) | 33.53 s |
| Caisson (Sibling APFS) | 0.06 s (-99.2%) | 14.47 s (-60.8%) | 0.54 s | 20.56 s (-27.5%) |
Two myths broke down immediately:
.noindexon/gave virtually zero relief. Directory-level exclusions on the root Data volume do not stop volume-boundary Spotlight and FSEvents churn..sparseimagecrushed small-file I/O. Running APFS inside a disk image added a 6.7x penalty on small-file writes and slowed parallel worktrees by 3.1x.
The Sibling APFS Volume Approach
An APFS container can host a sibling volume (/Volumes/caisson) that shares the exact same free space pool as your main drive with zero fixed partition waste, full native NVMe speed, and clean volume-boundary daemon shielding.
Layering native Darwin clonefile(2) Copy-on-Write worktree hydration and O(1) rename-to-trash teardown on top of that volume changes the daily feel of multi-worktree work. Measured across 5 parallel Next.js worktrees (217,425 files / 3.0 GiB logical, 3 alternating A/B pairs):
- Interactive teardown (5x):
9.79 sdown to0.158 s(62.0x faster) - Provision 5 worktrees:
11.88 sdown to6.88 s(1.73x faster) - Total macOS daemon CPU:
38.58 sdown to10.22 s(-73.5%) mds_storesCPU:1.58 sdown to0.00 s(-100%)- Physical APFS disk delta:
120.9 MiBdown to88.2 MiB(-27.0% metadata overhead)
The Hidden 52x syspolicyd Exec Tax
While profiling compile-and-test loops, we hit a second macOS tax that almost nobody notices: freshly compiled unsigned binaries (Rust tests, C/C++, Go, Swift) stall +85 to +150 ms on first execution unless your terminal or IDE is explicitly enabled under System Settings -> Privacy & Security -> Developer Tools (disabled by default).
caisson doctor includes a 150 ms, zero-sudo two-binary exec probe that measures this directly:
- Unexempt terminal: 99.5 ms on first exec
- Developer Tools enabled: 1.89 ms (52x faster)
Try Caisson
Caisson is MIT-licensed and distributed as a universal macOS binary via Homebrew:
brew install beckhq/tap/caisson
caisson doctor
Full benchmarks, architecture decisions, and source code are available at github.com/beckhq/caisson.