Cua

How many idle sandboxes fit on one Mac?

One Mac kept 448 Spaces running as idle headless gVisor containers, or 126 Spaces as microVMs (1 vCPU, 1 GiB each), with every exec check passing, on a Mac Studio (Apple M2 Max, 96 GB), measured 2026-10-25 on Cua Spaces 0.15.0.

Measured Build app 0.15.0, cua 0.9.0, cua-spacesd 0.8.0Raw data (CSV)

Results

Most idle Spaces running at a step where every check passed. Higher is better.

gVisor containers
448 Spaces
microVMs
126 Spaces
Every result on this page
ResultValuenMeasured
gVisor containers448 Spaces max152026-10-25
microVMs126 Spaces max82026-10-25

Method: gVisor containers

Driver on the host: density.sh with rollout_bench (Rust SDK, built from the tag) against this release's daemon. Idle gVisor Spaces (--kind container --runtime gvisor --headless, 1 vCPU / 1 GiB, kept running) are added in steps to 1, 8, 16, 32, 64, 96, 128, then +32 to 256, then +64 (at most 32 creates in flight). After each step: wait for the host to settle, sample host memory and CPU, then 10 serial exec round trips on every running Space (rollout_bench probe). Stop rule: running < target (2% slack), any probe error, exec p95 > 2x the one-Space p95 (and > +5 ms), or < 8 GB host memory free+inactive. Headline = the most Spaces at a step that passed every check. samples.csv: one row per step.

Caveats

  • Last step that passed: 448 Spaces (exec p50 4.5 ms, p95 5.9 ms, against 4.9 ms with one). At the next step (512), creates and exec checks failed, so the ramp stopped.
  • All run inside the built-in Linux runtime VM at its default size here (4 vCPU, 32 GiB).
  • Idle Spaces (only cua-spacesd); a workload in each Space lowers the count.

Environment and build

MachineMac Studio, Mac14,13 (Mac Studio)
ChipApple M2 Max, 12 cores
Memory96 GB
OSmacOS 26.6.2 (25G83)
Wherelocal
Kindgvisor
Imageghcr.io/trycua/linux:24.04-slim
Shape1 vCPU, 1 GiB per Space, --headless
SettingsCUA_POOL_AUTO=off; built-in Linux runtime VM at its default size on this Mac, 4 vCPU / 32 GiB (CUA_RUNTIME_LINUX_CPUS=12 / MEMORY_GIB=64 were in the daemon's environment but the already-running runtime VM kept its size, per the daemon log)
Other vms1
Networkn/a (local)
BuildCua Spaces 0.15.0 DMG (https://github.com/trycua/cua/releases/download/cua-spaces-v0.15.0/cua-spaces-0.15.0-darwin-universal.dmg, sha256 8725a09ba4132aa8a1667fa48c86416c91d5dec0d3c7dc93f88f5f3e29e0aba0): bundled cua 0.9.0, Helpers/cua-spacesd 0.8.0, cua-vz
App0.15.0
cua0.9.0
cua_spacesd0.8.0

Reproduce

# On an Apple silicon Mac (macOS 26), with Rust (rustup) and git:
curl -fLO https://github.com/trycua/cua/releases/download/cua-spaces-v0.15.0/cua-spaces-0.15.0-darwin-universal.dmg
hdiutil attach -nobrowse -mountpoint /tmp/cua-dmg cua-spaces-0.15.0-darwin-universal.dmg
mkdir -p ~/bench && ditto "/tmp/cua-dmg/Cua Spaces.app" ~/bench/"Cua Spaces.app" && hdiutil detach /tmp/cua-dmg
git clone --depth 1 --branch cua-spaces-v0.15.0 https://github.com/trycua/cua ~/bench/cua
(cd ~/bench/cua/libs/cua && cargo build --locked --release -p cua-sdk --example rollout_bench --example channel_bench)
export PATH="$HOME/bench/Cua Spaces.app/Contents/MacOS:$PATH" CUA_HOME=~/bench/home DO_NOT_TRACK=1 CUA_TELEMETRY=0
RB=~/bench/cua/libs/cua/target/release/examples/rollout_bench
mkdir -p ~/bench/harness && cd ~/bench/harness && for f in density.sh env.sh sample.py envsnap.py; do curl -fLO https://cua.ai/benchmarks/sandboxes-per-mac/files/$f; done
CUA_POOL_AUTO=off cua daemon start --foreground &
bash density.sh gvh 768 32 --kind container --runtime gvisor --headless

Method: microVMs

Driver on the host: density.sh with rollout_bench (Rust SDK, built from the tag) against this release's daemon. Idle microVM Spaces (--kind microvm --headless, 1 vCPU / 1 GiB, kept running) are added in steps to 1, 8, 16, 32, 64, 96, 128, then +32 to 256 (at most 16 creates in flight). After each step: wait for the host to settle, sample host memory and CPU, then 10 serial exec round trips on every running Space (rollout_bench probe). Same stop rule as the gVisor run. Headline = the most Spaces at a step that passed every check. samples.csv: one row per step.

Caveats

  • 126 microVMs ran. At the next step the extra creates failed to start: macOS allows 128 VMs per host, and two other VMs were running (the built-in Linux runtime VM and one idle VM).
  • Virtualization.framework VM processes grew from 24.0 GB to 71.4 GB at 126 microVMs (about 385 MB resident each, 1 GiB guests).
  • Idle Spaces (only cua-spacesd).

Environment and build

MachineMac Studio, Mac14,13 (Mac Studio)
ChipApple M2 Max, 12 cores
Memory96 GB
OSmacOS 26.6.2 (25G83)
Wherelocal
Kindmicrovm
Imageghcr.io/trycua/linux:24.04-slim
Shape1 vCPU, 1 GiB per Space, --headless
SettingsCUA_POOL_AUTO=off; runtime vz (bundled cua-vz)
Other vms1
Networkn/a (local)
BuildCua Spaces 0.15.0 DMG (https://github.com/trycua/cua/releases/download/cua-spaces-v0.15.0/cua-spaces-0.15.0-darwin-universal.dmg, sha256 8725a09ba4132aa8a1667fa48c86416c91d5dec0d3c7dc93f88f5f3e29e0aba0): bundled cua 0.9.0, Helpers/cua-spacesd 0.8.0, cua-vz
App0.15.0
cua0.9.0
cua_spacesd0.8.0

Reproduce

# On an Apple silicon Mac (macOS 26), with Rust (rustup) and git:
curl -fLO https://github.com/trycua/cua/releases/download/cua-spaces-v0.15.0/cua-spaces-0.15.0-darwin-universal.dmg
hdiutil attach -nobrowse -mountpoint /tmp/cua-dmg cua-spaces-0.15.0-darwin-universal.dmg
mkdir -p ~/bench && ditto "/tmp/cua-dmg/Cua Spaces.app" ~/bench/"Cua Spaces.app" && hdiutil detach /tmp/cua-dmg
git clone --depth 1 --branch cua-spaces-v0.15.0 https://github.com/trycua/cua ~/bench/cua
(cd ~/bench/cua/libs/cua && cargo build --locked --release -p cua-sdk --example rollout_bench --example channel_bench)
export PATH="$HOME/bench/Cua Spaces.app/Contents/MacOS:$PATH" CUA_HOME=~/bench/home DO_NOT_TRACK=1 CUA_TELEMETRY=0
RB=~/bench/cua/libs/cua/target/release/examples/rollout_bench
mkdir -p ~/bench/harness && cd ~/bench/harness && for f in density.sh env.sh sample.py envsnap.py; do curl -fLO https://cua.ai/benchmarks/sandboxes-per-mac/files/$f; done
CUA_POOL_AUTO=off cua daemon start --foreground &
bash density.sh mvh 256 16 --kind microvm --headless

Helper scripts: density.sh, env.sh, sample.py, envsnap.py.

Cua commands use the published Cua Spaces 0.15.0 release and the public trycua/cua repository at the tag cua-spaces-v0.15.0. Downloads: samples (CSV), result (JSON), this page as Markdown.

Questions

What stopped each ramp?

For gVisor, creates and exec checks failed at the step after 448. For microVMs, macOS allows 128 VMs per host and two other VMs were running, so 126 was the most.

Can I run this myself?

Yes. The commands under Reproduce use the published Cua Spaces 0.15.0 release and the public trycua/cua repository at the tag cua-spaces-v0.15.0. A `cua bench run` command that wraps them is coming; it isn't in a release yet.

Checked 2026-10-25. Sources: the samples and result files above, measured by Cua. All benchmarks.

Open in your browser to continue

Sign-in often fails inside this app's built-in browser. Open this page in Safari or Chrome to continue.