# Does a Cua Space start faster than an E2B sandbox?

On 2026-10-25, from the same Mac Studio and in the same minutes: a Cua Space running on the Mac ran its first command 234.6 ms after create, and an E2B sandbox reached over the internet 299 ms (p50; n = 30 and 30). The round trip to E2B's API was 14.5 ms minimum, 44.8 ms average.

- Page: https://cua.ai/benchmarks/spaces-vs-e2b-cold-start
- Measured: 2026-10-25
- Raw data: https://cua.ai/benchmarks/spaces-vs-e2b-cold-start.csv
- Helper script: https://cua.ai/benchmarks/spaces-vs-e2b-cold-start/files/e2b_bench.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
- E2B: build E2B cloud, official E2B Python SDK e2b 2.59.0; 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) | E2B |
| --- | --- | --- |
| Fastest | 204.8 ms | 195.5 ms |
| p50 | 234.6 ms | 299 ms |
| p90 | 257.7 ms | 417.2 ms |
| p99 | 270.1 ms | 877.8 ms |
| Slowest | 270.1 ms | 877.8 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).
- Golden snapshots on (the default): the excluded first create records the snapshot that later creates restore.
- Measured on the Mac itself: no network between the client and the Space.

## 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 (E2B)

Driver on the Mac (same host, same minutes as the Cua run): `e2b_bench.py cold --n 30 --conc 1` with the official E2B Python SDK. Each sample = `AsyncSandbox.create()` start → `sandbox.commands.run("true")` returns exit 0 (create + first exec), serial, each sandbox killed after its sample. Includes the internet round trips from the Mac to E2B (us-west1); Cua's numbers are on the same machine with no network hop, so this compares what a client on this Mac sees, not E2B's in-region create time. Run right after the Cua gVisor serial run, 2026-10-25 ~00:44 UTC.

## Environment (E2B)

- 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: e2b-cloud
- Image: E2B default base template
- E2b region: GCP us-west1 (The Dalles, Oregon; ipinfo from inside a sandbox, 2026-10-25)
- Network: home internet from the Mac; ICMP RTT to api.e2b.app (34.102.227.47) min/avg/max 14.5/44.8/139.4 ms (10 pings, 2026-10-25 00:43 UTC)
- Other vms: 2
- Build: E2B cloud, official E2B Python SDK e2b 2.59.0

## Caveats (E2B)

- Different network paths: E2B is reached over the internet from the Mac (E2B region GCP us-west1); the Cua Space runs on the Mac.
- E2B's base template is 2 vCPU and 512 MiB; the Cua Space is 1 vCPU and 1 GiB, headless.
- This is what a client on this Mac sees, not E2B's in-region create time.

## Reproduce (E2B)

```sh
python3 -m venv e2b-venv && e2b-venv/bin/pip install e2b==2.59.0 httpx
curl -fLO https://cua.ai/benchmarks/spaces-vs-e2b-cold-start/files/e2b_bench.py
export E2B_API_KEY=...   # your key
e2b-venv/bin/python e2b_bench.py cold --n 30 --conc 1 --label cold30
```

## Questions

### Is this a fair comparison?

It compares what a client on this Mac sees. The Cua Space ran on the Mac itself; E2B was reached over the internet from the same Mac, in the same minutes. A client inside E2B's region would see a shorter E2B time. The shapes differ too: E2B's base template has 2 vCPU and 512 MiB, the Cua Space 1 vCPU and 1 GiB.

### Where do the E2B sandboxes run?

In E2B's GCP us-west1 region, read from inside a sandbox on the day.

### 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.
