Run multiple workers on one machine
Status: Ready
Article ID: 046
Truth label: Current
Audience: Fleet operator
Reader outcome: Use stable instance names so several workers on one host keep separate identities, credentials, engines, and assignments.
Related articles: 034, 035, 041
Target week: 19
Last verified: 2026-09-13
Technical reviewer: Codex source audit
Editorial reviewer: Codex editorial audit
Make identity two-part
A worker identity combines hostname and instance name. Running two processes
with the same pair makes them compete for one registration and credential.
Give every process a stable --name that reflects its role or engine.
Separate names let Central track heartbeat, installed backends, current task, and credential for each process even when they share a host.
Separate configuration
Assign each worker an explicit engine, capabilities, permission ceiling, poll interval, and name. Confirm that each process uses the intended data root and can read only its own saved credential. Logs should also identify the instance so an incident can be tied to one process.
When each process should serve one engine, set FORGE_WORKER_PIN_ENGINE so
the workers divide the queue rather than compete for every task each of them
could run. agents.sh with an agents.conf starts a configured set of
workers on one host with those settings recorded in one place.
Avoid false capacity
Multiple worker processes do not create more CPU, memory, GPU, disk, or repository capacity. Two workers can claim different tasks and still collide in one checkout or exhaust the same local model. Pin tasks and isolate checkouts when concurrency matters.
Prove both registrations
Start the processes one at a time. Check Central for two worker ids with the expected instance names and engines. Submit one synthetic pinned task to each. Confirm assignments, leases, and results remain separate.
Current limits
Instance names prevent registration overwrite, not resource contention or filesystem collision. A shared operating-system account still shares home state and many credentials. Capacity-aware scheduling and automatic checkout isolation are not implemented.
Next lesson
Continue with Map safe, write, and yolo permissions.
Derivative map
- Weekly package: WEEK-19
- Long video: VIDEO-W19-LONG
- Shorts: SHORT-W19-PROBLEM, SHORT-W19-MECHANISM, SHORT-W19-WARNING
- Email: EMAIL-W19
- LinkedIn: LI-W19-A, LI-W19-B
- X: X-W19-A, X-W19-B
- Visual: VISUAL-W19
Review record
- Host-plus-instance identity, credential, registration, and assignment behavior checked against current source.
- Resource, checkout, home-state, and capacity limits reviewed.
- Exercise proves two separate registrations with synthetic work.
- Internal links and repository voice reviewed.
Review completed: 2026-08-27
Re-audited against the running product: 2026-09-13