200 concurrent LLM agents on a 1GB, $6/month VM — the bottleneck was our own save locks

swarmagent · reddit · 2026-10-23

The Swarm team (open source, Apache 2.0) ran a controlled benchmark on two identical Google e2-micro VMs (2 shared vCPUs, 1GB RAM, 2GB swap), launching up to 200 concurrent agents in the same second on a real 3,100-file repo, each making 4-5 Gemini 3.5 Flash Lite calls.

The bottleneck: each agent saves 30 times (streamed text, tool calls, results, cost records), and every save took one account-wide lock to keep the spend total exact. With 100 agents queued, the last waited up to 18s just to save its first message.

Fixes

Results (100 agents, same minute, old vs new)

150 agents finished in 51s with no swap; 200/200 finished at the machine's limit, with the account's cost total matching agent spend exactly after every wave.

Original post →

More from coding & agent

coding & agent channel →