Copy on write
Each copy, its own disk. You pay only for what it writes.
Before, every run -from copied the whole golden overlay: 76 ms per 200 MiB and ~6.7 GiB written for 32 copies.
With daemon.cow the overlay is a reflink clone: it shares the golden’s blocks until someone writes.
kling config set daemon.cow autosudo systemctl restart klingkling infoOutput (disks line)
disk clones: store (reflink inside kindling's XFS store) [daemon.cow=auto]; store /var/lib/kindling/cow (XFS): 15870 of 16384 MiB free; since start: store 32Three modes
Section titled “Three modes”daemon.cow |
What it does |
|---|---|
auto |
native reflink if the root is XFS or Btrfs; otherwise its own store; otherwise a copy |
reflink-store |
its own store even if the root can clone |
off |
the usual full copy |
The own store is an XFS (or Btrfs) file mounted over loop, fully reserved with fallocate: it cannot run out of space underneath.
In the repo: docs/cow.md · scripts/bench-cow.sh