# Does a Cua Space start faster than a Modal Sandbox?

On 2026-10-25: a Cua Space running on a Mac Studio ran its first command 234.6 ms after create; a Modal Sandbox, created from a different Mac over the internet with Modal's official Python SDK 1.6.2, took 690.7 ms (p50; n = 30 and 30). The two sides used different machines and network paths.

- Page: https://cua.ai/benchmarks/spaces-vs-modal-start
- Measured: 2026-10-25
- Raw data: https://cua.ai/benchmarks/spaces-vs-modal-start.csv
- Helper script: https://cua.ai/benchmarks/spaces-vs-modal-start/files/modal_start.py
- Cua Spaces (This Mac): build Cua 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; n = 30
- Modal Sandboxes: build Modal cloud, official Modal Python SDK 1.6.2; n = 30

## Results

Time from the create call until the first command returns, one sandbox at a time. Lower is better.

| Measure | Cua Spaces (This Mac) | Modal Sandboxes |
| --- | --- | --- |
| Fastest | 204.8 ms | 595.4 ms |
| p50 | 234.6 ms | 690.7 ms |
| p90 | 257.7 ms | 739.5 ms |
| p99 | 270.1 ms | 878.3 ms |
| Slowest | 270.1 ms | 919.4 ms |

## Method (Cua Spaces (This Mac))

Driver on the host: `rollout_bench create` (Rust SDK example built from the release tag) talks to this release's own `cua daemon` (isolated CUA_HOME). Workload: a gVisor container in the built-in Linux runtime VM (Lima on Virtualization.framework, default 4 vCPU / 32 GiB) Space created from ghcr.io/trycua/linux:24.04-slim with `--kind container --runtime gvisor --cpus 1 --memory-mb 1024 --headless` (only cua-spacesd in the guest, no desktop).

Each sample = `SandboxCreateOptions` create call start → the Space's cua-spacesd answers a first `sh -c true` with exit 0 (create + attach + first exec). n=30, serial (one at a time), each Space deleted after its sample. The warm pool is off (`CUA_POOL_AUTO=off`), so every sample is a real create. One warm-up create before the samples is excluded (image pull/unpack and the golden snapshot it records: 13014 ms).

## Environment (Cua Spaces (This Mac))

- Machine: Mac Studio, Mac14,13 (Mac Studio)
- Chip: Apple M2 Max, 12 cores
- Memory: 96 GB
- OS: macOS 26.6.2 (25G83)
- Where: local
- Kind: gvisor
- Image: ghcr.io/trycua/linux:24.04-slim
- Shape: 1 vCPU, 1 GiB, --headless
- Other vms: 2
- Network: n/a (local)
- Settings: CUA_POOL_AUTO=off (no warm pool); golden snapshots at their default (on)
- Build: Cua 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
- App: 0.15.0
- cua: 0.9.0
- cua_spacesd: 0.8.0

## Caveats (Cua Spaces (This Mac))

- Headless shape (only cua-spacesd); the full desktop image starts slower.
- Golden snapshots on (the default): the excluded first create records the snapshot that later creates restore.
- With CUA_GVISOR_WARM=0 (no golden snapshot), n = 10: p50 257.9 ms, p95 272.9 ms.

## Reproduce (Cua Spaces (This Mac))

```sh
# 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
cua daemon start --foreground &   # with CUA_POOL_AUTO=off in its environment
IMG=ghcr.io/trycua/linux:24.04-slim
$RB create --prefix warm- --n 1 --image $IMG --kind container --runtime gvisor --cpus 1 --memory-mb 1024 --headless   # excluded warm-up
$RB create --prefix cold- --n 30 --conc 1 --image $IMG --kind container --runtime gvisor --cpus 1 --memory-mb 1024 --headless   # one JSON line per sample (ready_ms)
```

## Method (Modal Sandboxes)

Serial, one at a time. t0 before modal.Sandbox.create(app, image=debian_slim, cpu=1, memory=1024); value = time until sb.exec('echo','ok') stdout is read back and the process has exited. create_ms = Sandbox.create returned. One warmup sample (image cache fill) excluded. Each sandbox terminated right after its sample; app stopped at the end.

## Environment (Modal Sandboxes)

- Machine: A second Mac (the client)
- Where: Modal cloud, client remote
- Kind: modal-sandbox
- Image: modal.Image.debian_slim() (cached after warmup)
- Resources: cpu=1.0, memory=1024 MiB, timeout=120 s
- Network: public internet client -> Modal API
- Build: Modal cloud, official Modal Python SDK 1.6.2

## Caveats (Modal Sandboxes)

- Measured from a different Mac than the Cua run, reaching Modal over the internet. No round-trip time was recorded.
- Create returns in about 0.1 s (mostly the API call); the first command includes the container start.
- Image: Modal's debian_slim, cached after one excluded warm-up; 1 CPU, 1024 MiB.

## Reproduce (Modal Sandboxes)

```sh
uv venv .venv && uv pip install --python .venv/bin/python modal==1.6.2
curl -fLO https://cua.ai/benchmarks/spaces-vs-modal-start/files/modal_start.py
MODAL_ENVIRONMENT=<your environment> .venv/bin/python modal_start.py 30 debian_slim
modal app stop cua-bench --env <your environment> -y
```

## Questions

### Is this a fair comparison?

Only roughly. Both sides time create to first command the same way on the same day, but the Cua Space ran on the Mac with no network hop, while the Modal Sandboxes were created from a different Mac over the internet. Modal's own in-region time would be shorter than what a remote client sees.

### Can I run this myself?

Yes. The Cua side uses the published Cua Spaces 0.15.0 release and the public trycua/cua repository at the tag cua-spaces-v0.15.0; the other side uses the vendor's official Python SDK and the script linked under Reproduce. You need your own account and API key for the vendor.

## Earlier runs

| Measured | Value | n | Build |
| --- | --- | --- | --- |
| 2026-10-24 | 726 ms (p50) | 30 | Modal cloud, official Modal Python SDK 1.6.2 |
