Self-hosted sandboxes · measured on our own nodes
How do other self-hosted sandboxes compare?
The rest of the site measures runtimes that sit under a Kubernetes pod. Agent sandbox products start differently: some restore a snapshot instead of booting, some keep memory across a pause, some hand out a pod that is already running. This page measures every one of them we could run on our own infrastructure, on the same node type and at the same size as the pods, and labels each with what it runs on underneath.
Only things we can deploy ourselves. Hosted-only services (sandboxes that run on the vendor's machines) are left out. AWS Lambda MicroVMs run on AWS hardware but inside our own AWS project, so they are in. Edera was skipped.
Nodes: m8id.xlarge (4 vCPU, 16 GiB, local NVMe), kernel 7.0, nested KVM, us-east-2 · Sandboxes: 1 CPU / 2 GiB · 20 rounds each, one sandbox at a time · iteration 8
Verdict
What to know before you pick one
kubectl apply. The isolation you pick stops mattering for start time, as long as the pool has a pod ready: this was measured one claim at a time with a full 2-pod pool. A burst bigger than the pool falls back to a cold start (2.6 to 3.6 s for Kata), which was not tested.kubectl exec is not supported.Underneath
What each one runs on
"Runs on" names the stack under the product. Kernel and disk are what the probe saw from inside the sandbox; the pod runtimes are on this page so the new rows have something to stand next to.
| Sandbox | Runs on | Kernel seen inside | Root disk | A new sandbox is | Pause keeps |
|---|---|---|---|---|---|
| runc, Sysbox (pods) | host kernel, namespaces | host 7.0 | host overlay | a process | no pause |
| gVisor (pods) | user-space kernel | 4.19.0-gvisor | through its file proxy | a process | no pause |
| Kata QEMU, Cloud Hypervisor, Firecracker (pods) | KVM VM per pod | guest 6.18.56 | virtio-fs share (block disk for Firecracker) | a VM booted cold | no pause |
| krun (pods) | libkrun, through crun | guest 6.12.115 | virtio-fs share | a VM booted cold | no pause |
| Agent Sandbox warm pool | pre-started pods of any runtime above | same as the runtime | same as the runtime | a running pod handed over | no pause |
| E2B Embed (self-hosted) | Firecracker, snapshot restore | guest 6.1.177 | ext4 on virtio-blk | a booted VM restored from a snapshot | memory and disk |
| CubeSandbox (self-hosted) | its own KVM hypervisor, snapshot clone | guest 6.6 | overlay (virtio-pmem lower, virtio-blk upper) | a reflink clone of a snapshot, restored | memory and disk |
| microsandbox | libkrun | guest 6.12.117 | overlay on virtio-blk and virtio-fs | a VM booted cold | no pause |
| AWS Lambda MicroVMs | Firecracker, run by AWS in our project | guest 6.1.166 | image built from a Dockerfile | a VM started from an image | memory and disk |
Data: bench/results/probe/round2-node-a · lanes/*/README.md (probe .tsv files in each folder)
Start path · 1 CPU / 2 GiB · 20 rounds
Start, pause and resume, side by side
Median milliseconds; the main ranges are listed under the table. "Ready" is created until it can take work. Pod rows run their command and write through kubectl exec, which adds about 60 ms of kubectl start-up to each, so compare those two columns only within the pod rows. E2B, CubeSandbox and microsandbox are driven by their own SDK from the same node. Lambda MicroVMs are driven from a laptop, so every step after create carries a round trip of about 250 ms.
| Sandbox | Ready | First command | Write 1 MiB + sync | Pause | Resume + read back | Stop or delete |
|---|---|---|---|---|---|---|
| runc pod | 737 | 73 | 97 | – | – | 42 |
| gVisor pod | 721 | 65 | 69 | – | – | 44 |
| Sysbox pod | 741 | 81 | 102 | – | – | 41 |
| krun pod | 719 | no exec | no exec | – | – | 55 |
| Kata Cloud Hypervisor pod | 1,736 | 87 | 110 | – | – | 44 |
| Kata QEMU pod | 3,688 | 81 | 102 | – | – | 42 |
| Kata Firecracker pod | 3,742 | 73 | 76 | – | – | 41 |
| Warm pool claim (any runtime) | 64–72 | as the runtime | as the runtime | – | – | – |
| E2B Embed | 122 | 8.8 | 16.6 | 263 | 1,538 | 9.4 |
| CubeSandbox | 165 | 71 | 32 | 44.5 | 262 | 197 |
| microsandbox | 608 | 17.1 | 18.5 | none | none | 86 |
| AWS Lambda MicroVMs (from a laptop) | 1,447 | 511 | 434 | 461 | 733 | 130 |
- Ranges: E2B create 54–300, resume 91–2,157; CubeSandbox resume 260–269; microsandbox create 603–640; Lambda create 1,161–1,880. Every row and its range is in the README of its results folder.
- The first sandbox after an install is slower everywhere: CubeSandbox's first pause took 1,562 ms, and microsandbox's first create (which pulls the image) 1,706 ms.
- E2B and CubeSandbox ran their vendor's Debian image, not our bench image; the pods and krun ran our bench image.
Data: bench/results/lanes/pod-start/round2-node-a-2 · krun/round2-node-a-3 · e2b-embed-1c2g/round2-node-b-2 · cubesandbox-1c2g/round2-node-b-2 · microsandbox/round2-node-a-3 · lambda-microvm/mac-1
kubernetes-sigs/agent-sandbox v1.0.2
Warm pools: the runtime stops mattering
A pool of 2 pods per runtime is kept running; a claim takes one. Cold is a new Sandbox started on request. Ready is stamped from a watch. Median (range) ms, 20 rounds. Every warm claim was a pool hit: the test waits for the pool to refill before each claim, so a burst that empties the pool (and falls back to the cold column) was not measured.
| Runtime | Cold (started on request) | Warm (running pod handed over) |
|---|---|---|
| runc | 600 (531–1,558) | 72 (60–80) |
| gVisor | 577 (536–1,548) | 67 (63–84) |
| Kata Cloud Hypervisor | 2,565 (1,987–2,631) | 71 (64–112) |
| Kata QEMU | 3,592 (2,992–3,642) | 66 (59–97) |
| Kata QEMU, tuned | 3,588 (2,992–3,631) | 67 (61–76) |
| Kata Firecracker | 3,577 (2,992–3,639) | 64 (60–74) |
- About 47 ms of every warm claim is
kubectl applyreturning, so the hand-over itself is about 20 ms. - The price is idle pods: a pool of 2 holds 2 CPUs and 4 GiB per runtime whether or not anyone claims them.
- Cold starts fall on steps of about 0.6 s and 1 s. That points at the kubelet or runtime path rather than VM boot; we didn't look further.
Data: bench/results/lanes/warm-pool/round2-node-a-2
crun 1.31 + libkrun 1.19.8
krun pods: a VM that starts like a container
| Runtime | Ready | Delete | First exec | Write 1 MiB + sync |
|---|---|---|---|---|
| runc | 717 (636–782) | 44.5 (42–51) | 80 (74–91) | 90 (88–101) |
| krun | 719 (629–834) | 55 (49–65) | not supported | not supported |
kubectl execfails: "the handler does not support exec". Our micro-benchmarks all run through exec, so krun has start and delete times only.- The CPU limit doesn't reach the VM. The guest saw all 4 of the node's CPUs; the 1 CPU limit is only the cgroup around the VM. Memory (about 1.98 GiB) did match.
- No network card inside: libkrun passes sockets through to the host instead of giving the guest a NIC.
- It took six attempts to build on Ubuntu (missing build tools, then libkrun 2.0 and crun's main branch not building together).
lab/install/72-krun.shnow pins release tags.
Data: bench/results/lanes/krun/round2-node-a-3
E2B Embed v0.30 · memory sweep
E2B resume: uneven at every size
At 2 GiB, E2B's resume ranged from 91 ms to 2.2 s. To see if memory size was the cause, the same test ran at 1 vCPU with 512 MiB, 1 GiB and 2 GiB. Median (range) ms, 20 rounds each, 60 of 60 ok.
| Memory | Create | Pause | Resume + read back |
|---|---|---|---|
| 512 MiB | 105 (49–153) | 222 (141–2,410) | 891 (111–2,955) |
| 1 GiB | 89 (51–271) | 169 (111–399) | 1,357 (91–1,853) |
| 2 GiB | 149 (46–259) | 135 (40–423) | 1,519 (124–2,452) |
- The median resume rises with memory, but every size has resumes near 100 ms and resumes above 1.8 s. Memory size is not the main cause of the spread. The orchestrator logs around each resume are saved but not yet analysed.
- 2 GiB sandboxes need a bigger hugepage pool than E2B reserves by default (2,048 pages); with the default, creates and resumes were refused.
- A template built from our own bench image failed: the E2B SDK doesn't accept multi-stage Dockerfiles.
Data: bench/results/lanes/e2b-followup/round2-node-b-3
AWS Lambda MicroVMs · us-east-2
Lambda MicroVMs: suspend and resume, run by AWS
| Step | Median (ms) | Range (ms) |
|---|---|---|
| Create (until RUNNING) | 1,447 | 1,161–1,880 |
| Network round trip (GET /health) | 247 | 222–260 |
| First command | 511 | 477–538 |
| Write 1 MiB + sync | 434 | 365–467 |
| Suspend (until SUSPENDED) | 461 | 429–745 |
| Resume + read back | 733 | 685–964 |
| Terminate | 130 | 121–611 |
- Timed from a laptop on a home connection, not a machine in the Region. Take off the ~250 ms round trip from first command, write and resume before comparing; even then it isn't like for like. State changes were polled every 100 ms.
- Not 1 CPU / 2 GiB. You can't choose CPU or memory when you start one; the image only sets a minimum memory (2,048 MiB here). The VM came up with 4 CPUs and about 7.8 GiB.
- Every resource was deleted afterwards: 22 MicroVMs, the image, the build role, the bucket and the log group.
Data: bench/results/lanes/lambda-microvm/mac-1
Read with care
Caveats
- One node type (m8id.xlarge) with nested KVM, so every VM here is a VM inside a VM. Bare metal would likely shorten the VM rows; see Bare Metal Analysis
- These are start-path numbers only. File, network and CPU work inside these products was not measured, except through the probe.
- Pod rows go through
kubectl; product rows go through each product's SDK on the same node. The two kinds of client add different overheads. - CubeSandbox's disk was XFS on a loop file on the node's root EBS volume, not a dedicated disk.
- Not done: Edera (skipped), hosted-only services, E2B on our exact bench image, analysis of E2B's resume logs, microsandbox and krun under the full workload set.