A child forge's disk bandwidth is capped by its size
A child forge's cell shares the parent's disk. io.weight only orders the
queue, so one busy child could still starve the parent's database and its
neighbours. Each child's cell now gets io.max on the disk under the forge's
data, sized by the child's size (#10854).
| Size | Read | Write | Read ops/s | Write ops/s |
|---|---|---|---|---|
| small | 50 MiB/s | 25 MiB/s | 1000 | 500 |
| medium | 100 MiB/s | 50 MiB/s | 2000 | 1000 |
| large | 200 MiB/s | 100 MiB/s | 4000 | 2000 |
- Where. The cell's cgroup,
cells/<child>/io.max, one line:MAJ:MIN rbps=… wbps=… riops=… wiops=…. The device is the whole disk under the child's directory in the forge's data (a partition is walked up to its disk through/sys/dev/block). - When it is not written. Where the io controller is not delegated to
cells/, where the data sits on no block device (tmpfs, overlay, a network mount), or where the kernel refuses the device. The cell still starts; onlyio.weightorders it then. The cell's cgroup result says which (ioCapped). - Tuning. The numbers are a starting point, not a measurement. They live in
SIZE_IOinsrc/spawn/sizes.ts. To tune: runfio(ordd oflag=direct) against the data volume on the host to learn what the disk sustains, then keep the largest size's cap well under it so the parent always has headroom. A new cap applies when a child's cell next starts. Watchcells/<child>/io.statagainstio.maxto see whether a child is pinned at its cap. - Tests:
test/cgroup.test.ts(the line, the device, and a child cell that getsio.maxonly where io is delegated).