What a forge costs (#12092)

A forge is one process and one thread. Pages and git need nothing else: Chromium (looks) and the crew's AI tool are optional, and /system ("What the forge costs") says which are off and why.

The stated budget (BUDGET in src/system/footprint.ts) for a 1-CPU, 512 MiB machine: 256 MiB resident at rest, the first page within 5 s of start, and an empty forge's data under 64 MiB. A reading over it says "Over budget", never hidden.

Where it shows:

What is off on a small machine (#12522)

Three parts are optional, and each is listed on or off with one line of why:

Where to read it:

The release proof reads the footprint once the new version answers /healthz, before the smoke checks load it, and keeps it in release/proof.json (footprint). /system shows this process's last reading, else the proof's.

The small forge in the release proof (#12532)

Once the smoke checks and the stranger's journey pass, the proof boots a second forge from the same checkout, held by the kernel to 1 CPU and 512 MiB (a cell cgroup of its own: memory.max 512 MiB, cpu.max one core, swap off), on an empty scratch directory under <data>/release/small, and walks its first hour (src/release/small_forge.ts): /readyz, the home page, a first admin (a code minted into its database, redeemed at POST /api/v1/first-admin), a repository, a push of a commit whose forge.json declares check.run: "true", and that commit's check reaching ok. Its VmRSS is read at rest (3 s after ready, before any request) and after the walk, with the cgroup's memory.peak and OOM kills.

Reading the disk figure walks the whole data directory (treeBytes), once per release proof and never on a page view; on a big data directory that walk can take seconds. It is asynchronous, so it does not hold the event loop.

This is the measurement step. The work that cuts the footprint is tracked in its own issues, each blocking #12092: the cell ceiling on a small pod (#12346), reading the pod's limit in /system and health (#12347), a launcher-free start (#12348), lazy-loading what a small forge never uses (#12349), an ARM image (#12350), and the serve/work split only on machines with cores (#12351).

What loads on first use (#12349, #12521)

The boot's static imports reach neither the terminal UI nor the MCP server and its tool index (test/boot-lazy.test.ts walks them). The terminal loads when FORGE_SSH_PORT is set; the MCP modules load on the first request that needs the tools (/mcp, /llms.txt, /agents, /.well-known/mcp.json, /.well-known/agent-card.json, a held confirm said yes to) through src/http/mcp/load.ts. The route table names /mcp from boot (lazyRoutes in src/http/lazy_routes.ts), so matching, gates and 405s are unchanged; the first such request waits for one import (0.1 s on a dev machine; every later one does not). A load that fails answers that request with an error naming the MCP tools, and the next request tries again.

The boot graph went from 2,653 modules to 2,433; RSS at rest on a fresh forge (FORGE_SSH_PORT=0 FORGE_APPS=0, 20 s after /healthz answers, source run on a dev machine) went from 313–333 MiB (three runs) to 265–271 MiB. The next largest family, the OpenAPI contract's route descriptions (443 modules), is still loaded at boot: the admin gate and the cursor guard read it on every request.

Measured sizes (2026-11-13, release image, same first-hour journey)

limitboot to first pageRSS at rest / afterresult
2 CPU / 2 GiB3.5 s172 / 396 MiBpasses
1 CPU / 1 GiB5.3 s175 / 356 MiBpasses
1 CPU / 512 MiB5.8 s170 / 382 MiBpasses, barely
0.5 CPU / 384 MiB10–13 s167 / killedthe forge was OOM-killed by its own cell (#12346)
0.25 CPU / 256 MiB25 s168 / 202 MiBpasses
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs