raft / docs
Reference

Capacity limits and planning

Raft provides capacity inspection and allocation policies designed to keep dedicated hosts stable while running concurrent workspaces.

Inspecting capacity with raft limits

Run raft limits to view host resources and workspace allocation calculations:

CONTROLLER: View host capacity report
raft limits

# Output JSON for programmatic inspection
raft limits --location lab --json

The output displays host CPU count, total RAM, configured limits, available RAM, disk headroom, and advisory recommendations across all six sizing profiles:

Illustrative host sizing

Illustrative totals for 1 CPU / 2 GiB boxes on an empty host, using exact usable RAM values:

Host CPUsHost RAMRecommended runningEnforced saved maximum
28 GiB14
48 GiB34
416 GiB34
832 GiB44

Operating systems report less usable RAM than advertised hardware size. Near sizing boundaries, raft limits may calculate fewer recommended boxes. Available RAM and host processes can further reduce running capacity. These values are point-in-time advisory estimates, not hardware reservations.

Column definitions and algorithms

ColumnCalculation
Total runningmin(4, floor(CPU budget / box CPU), floor(Memory budget / box memory))
More runningBounded by remaining CPU, memory, available RAM, and active slots
New boxesmin(more running, max(0, 4 - saved boxes))

Total running assumes an empty host. More running accounts for current allocations, MemAvailable - Memory reserve, and 4 - active boxes. Active limits are not subtracted twice.

Sizing profiles

Select CPU and memory limits when launching with raft new:

  • --cpu: 1 or 2 shared vCPUs managed by Incus (default: 1).
  • --memory: 1GiB, 2GiB, or 4GiB cgroup limit (default: 2GiB).

Resizing existing containers or modifying limits upon resume is not supported.

Host resource reserves and active states

Raft calculates advisory host safety margins:

  • CPU reserve: 1 CPU core reserved for the host OS.
  • Memory reserve: The larger of 2 GiB or 10% of host RAM.

These reserves are advisory estimates for planning, not hard cgroup locks.

All non-Stopped states (such as Running or Frozen) count as active allocations. Stopped containers release CPU and RAM allocations while retaining their saved slot and disk storage.

Enforced admission limits

Hard limit: four saved boxes per location

Raft enforces a hard limit of four saved boxes per location. Both running and stopped containers occupy storage and count against this limit.

Exceeding four saved boxes fails with an admission error:

Location already holds four boxes

Destroy unused containers with raft destroy <box> to free slots. Advisory CPU and memory calculations do not block container creation or resumption.

Storage capacity

Every Raft host provisions a dedicated 60 GiB Btrfs pool (raft-data):

  • Shared pool: All containers, snapshots, and Docker layers share this 60 GiB pool.
  • No strict per-box quotas: Nested subvolumes prevent strict per-box quota enforcement.
  • Disk warnings: raft limits warns when free space on host disk or raft-data falls below 5 GiB. Warnings are diagnostic and do not block operations. raft doctor reports storage usage without emitting 5 GiB warnings.

On this page