# How fast can you snapshot a running Space?

Checkpointing a running Space that holds 300 MB in RAM and 100 MB on disk took 532.8 ms for a QEMU VM and 274.3 ms for a gVisor container (p50, n = 10 each) on a Mac Studio (Apple M2 Max, 96 GB), measured 2026-10-25. The Space kept running.

- Page: https://cua.ai/benchmarks/snapshot-running-sandbox
- Measured: 2026-10-25
- Raw data: https://cua.ai/benchmarks/snapshot-running-sandbox.csv
- QEMU VM: 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 = 10
- gVisor container: 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 = 10

## Results

Time for one checkpoint call of a running Space, serial. Lower is better.

| Measure | QEMU VM | gVisor container |
| --- | --- | --- |
| Fastest | 429.1 ms | 257.9 ms |
| p50 | 532.8 ms | 274.3 ms |
| p90 | 977.7 ms | 305.9 ms |
| p99 | 1.2 s | 310.6 ms |
| Slowest | 1.2 s | 310.6 ms |

## Method (QEMU VM)

Driver on the host: `rollout_bench checkpoint` (Rust SDK, built from the tag). The running Space (QEMU Linux VM, 2 vCPU / 2 GiB, --forkable) holds a world of 300 MB random data in /dev/shm and a 100 MB file on disk. Each sample = one `Sandboxes.checkpoint(space, name)` call of the running Space, start to return (the Space keeps running). n=10, serial, same source; the first QEMU checkpoint was pinned (fork source).

## Environment (QEMU VM)

- Machine: Mac Studio, Mac14,13 (Mac Studio)
- Chip: Apple M2 Max, 12 cores
- Memory: 96 GB
- OS: macOS 26.6.2 (25G83)
- Where: local
- Other vms: 1
- Network: n/a (local)
- Kind: vm
- Image: ghcr.io/trycua/linux:24.04-slim
- Shape: QEMU Linux VM, 2 vCPU / 2 GiB, --forkable, headless
- 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 (QEMU VM)

- The first QEMU checkpoint (pinned, 978 ms) is included.

## Reproduce (QEMU VM)

```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 &
$RB create --prefix fsrc- --n 1 --kind vm --cpus 2 --memory-mb 2048 --headless --forkable --keep
cua sb exec fsrc-0 'dd if=/dev/urandom of=/dev/shm/state bs=1M count=300; dd if=/dev/urandom of=$HOME/state.bin bs=1M count=100; sync'
for i in $(seq 1 10); do $RB checkpoint --source fsrc-0 --name ckq-$i; done
```

## Method (gVisor container)

Driver on the host: `rollout_bench checkpoint` (Rust SDK, built from the tag). The running Space (gVisor container, 2 vCPU / 2 GiB) holds a world of 300 MB random data in /dev/shm and a 100 MB file on disk. Each sample = one `Sandboxes.checkpoint(space, name)` call of the running Space, start to return (the Space keeps running). n=10, serial, same source; the checkpoints were deleted at the end.

## Environment (gVisor container)

- Machine: Mac Studio, Mac14,13 (Mac Studio)
- Chip: Apple M2 Max, 12 cores
- Memory: 96 GB
- OS: macOS 26.6.2 (25G83)
- Where: local
- Other vms: 1
- Network: n/a (local)
- Kind: gvisor
- Image: ghcr.io/trycua/linux:24.04-slim
- Shape: gVisor container, 2 vCPU / 2 GiB, headless
- 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 (gVisor container)

- What a gVisor checkpoint stores follows the runtime's checkpoint support; it wasn't inspected here.

## Reproduce (gVisor container)

```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 &
$RB create --prefix fsrc- --n 1 --kind vm --cpus 2 --memory-mb 2048 --headless --forkable --keep
cua sb exec fsrc-0 'dd if=/dev/urandom of=/dev/shm/state bs=1M count=300; dd if=/dev/urandom of=$HOME/state.bin bs=1M count=100; sync'
$RB create --prefix gsrc- --n 1 --kind container --runtime gvisor --cpus 2 --memory-mb 2048 --headless --keep
# same world as above in gsrc-0, then:
for i in $(seq 1 10); do $RB checkpoint --source gsrc-0 --name ckg-$i; done
```

## Questions

### Does the Space stop?

No. Each checkpoint is taken while the Space keeps running.

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