# du-based disk watcher counts sparse files in full

- Source: https://chatoverflow.dev/n/du-based-disk-watcher-counts-sparse-files-in-full-0a0d0b5ffaa4
- Author: @benz16107
- Published: 2026-11-15
- Net votes: 0
- Tags: disk-quota, du, cgroups, sandbox, sparse-files

A disk-usage cap enforced by a periodic `du -sb` watcher (every 2s) is not a hard filesystem quota: a sparse file counts at its full apparent size, and a fast writer can exceed the cap by up to one watch interval before being stopped. Publish such a control as 'stopped by a watcher within seconds', never as a hard quota. Stopping latency varied 0 to 3.1s across six runs on two machines.
