yuzu

Capacity Planning

Server Sizing

Fleet SizeCPURAMDiskNotes
1-100 agents1 core1 GB1 GBDevelopment / small office
100-1,0002 cores2 GB5 GBDepartment / single site
1,000-5,0004 cores4 GB20 GBEnterprise single-server
5,000-10,0004 cores8 GB50 GBEnterprise with gateway

Storage Growth

Data TypePer-Row SizeGrowth Rate (1,000 agents)
Response rows~1 KB~100 MB/day (100 commands/day/agent)
Audit events~0.5 KB~50 MB/day
Policy compliance~0.2 KB~10 MB/day
Echo events (per agent)~0.3 KB/event~2-3 MB/day/agent

Retention impact: At default retention (90 days responses, 365 days audit), a 1,000-agent fleet needs ~15 GB for responses and ~18 GB for audit data.

SQLite Performance

Agent Sizing

ResourceTypicalWith EchoNotes
RAM30-50 MB50-80 MBDepends on active plugins
Disk50 MB100 MBPlugins + Echo database
CPU< 1% idle< 2% idleSpikes during command execution
Network~1 KB/30s~1 KB/30sHeartbeat only when idle

The “Typical”/“With Echo” RAM figures above do not yet include one fixed addition: since #4666 PR-2, the agent’s async log hand-off queue pre-allocates 8193 x 408 bytes = 3,342,744 bytes (~3.34 MB, about 3.19 MiB) of RSS unconditionally at startup, whether or not anything is logged. This is on top of both figures, on every OS.

Echo disk usage: ~2-3 MB/day with 7-day retention (default). A busy workstation with many processes may use up to 10 MB/day.

Gateway Sizing

The Erlang/OTP gateway uses one process per connected agent:

Fleet SizeRAMCPUNotes
1,000 agents256 MB1 core~2 KB per agent process
5,000 agents512 MB2 coresHeartbeat batching reduces upstream load
10,000 agents1 GB2 coresConsider multiple gateways

The gateway process limit defaults to 262,144 (Erlang default), sufficient for 10,000+ agents.

Network Bandwidth

OperationSizeFrequencyBandwidth (1,000 agents)
Heartbeat~1 KBEvery 30s~33 KB/s
Command request~2-5 KBOn demandBurst
Command response~1-50 KBOn demandBurst
Metrics scrape~5-10 KBEvery 15s< 1 KB/s

Total steady-state for 1,000 agents: ~40 KB/s (heartbeats only).

Monitoring Thresholds

MetricWarningCriticalAction
Disk usage> 80%> 90%Reduce retention, add storage
Memory> 70%> 85%Check WAL sizes; reduce the connected-agent count per server (for example via a gateway)
CPU> 70% sustained> 90%Scale vertically or add gateway
Heartbeat loss> 5% of fleet> 20%Check network, server capacity
Response latency (p99)> 2s> 10sCheck disk I/O, SQLite locks

Scaling Patterns

  1. Vertical first — Increase server CPU/RAM. Yuzu is single-server by design (SQLite).
  2. Gateway sharding — Deploy multiple gateways, each handling a subset of agents (consistent hashing).
  3. Read replicas — Use Litestream to replicate SQLite to a read-only analytics node.
  4. Retention tuning — Reduce --response-retention-days and --audit-retention-days to control disk growth.
  5. External analytics — Offload response data to ClickHouse via analytics drain, keep SQLite lean.