Two agents, one Proxmox box

My homelab is one Proxmox box that does everything, which meant the day I started running two agents in parallel, they began fighting over the same CPU, the same disk queue, and occasionally the same files. Parallel agents are the whole point of agents. Two of them melting one host is an operations problem, not a model problem, and operations problems have boring solutions.

What actually went wrong

The failure mode wasn’t speed, it was variance. One agent would kick off a build or a test suite, saturate the cores for ninety seconds, and the other agent’s tool calls would time out mid-edit. Timeouts are worse than slowness. A slow agent finishes. A timed-out agent retries, and a retry of a half-finished edit is how you get the same function written twice in two styles.

Disk was the quieter problem. Two checkouts doing dependency installs at once turned the SSD into the bottleneck and neither install was fast enough to be worth it.

The boring fixes

Each agent gets its own LXC container with pinned cores and a memory ceiling. Not because containers are elegant, but because a ceiling turns “the box is slow today” into “this agent is slow today,” and the second sentence is debuggable.

Builds and test suites run under a lock. I wrote the world’s dumbest semaphore: a file lock around the three commands that eat the whole machine. Agents queue instead of colliding. Queueing feels slower and finishes faster, which is the oldest lesson in computing and I get to relearn it quarterly.

Scratch space is per-agent. Each container has its own workspace disk, so a runaway checkout or a log file with ambitions can’t fill the host’s root volume at 2 a.m. Shared things are shared on purpose, through a read-only mount of the stuff both agents legitimately need.

The result

Two agents in parallel now deliver roughly 1.7x one agent, not 2x, and I’ve made peace with that. The missing 0.3 is coordination overhead and it was never available to me in the first place. What I actually bought with the container split wasn’t speed. It was that when something breaks, I know which agent’s house is on fire, and the other one keeps working while I deal with it.

If you’re running agents on one box, my advice is to spend the afternoon on isolation before you spend a dollar on a second host. Most “I need more hardware” problems in this space are really “my workloads share everything and blame each other” problems.


← back to all posts