AWS Nitro Sandbox Analysis
Why does AWS Nitro behave the way it does?
Each Nitro pod is a virtual machine (VM). Most work in the pod is as fast as in a container. Network and disk are slow because AWS sets a limit for each pod. You can increase each limit.
Every number comes from phase 1 and phase 2 of iteration 3, on EKS Auto Mode with m8id.xlarge nodes (4 vCPU = 2 cores, 16 GiB, local NVMe) in us-east-2. Each Nitro number is compared with plain runc on the same node; the other runtimes come from our earlier kubeadm runs on the same instance type.
Confidential here means a custom, exec-enabled policy. Every confidential number on this page comes from a policy that allows exec, stdin, logs and stats so the benchmark could drive pods with kubectl exec. The stock confidential policy denies them, so these numbers are not the standard protection profile and the trust model is weaker; the stock policy was not benchmarked. Policy generation, attestation and secret release are outside the reported start times.
Pods: 1 CPU / 2 GiB · Phase 1: 3 rounds + 1 warm-up · Phase 2: 1–10 trials per cell
measured by usdocumented by AWSour estimate, not proven
Most work is fast: one VM, not two
A cloud node is a VM. Kata starts a second VM in the node. Thus each hardware request from the pod goes through two VMs. Nitro uses one VM: AWS starts the pod VM adjacent to the node, not in it. The pod VM also has its own disk. Kata shares a folder with the node, and a shared folder is slow.
83 vs 80 ns · within 12% · 7.3×, 3.9×, 2.2× (three labs, each compared with a container in the same lab)each pod is a first-level VM
Network, DNS and disk are slow: a limit for each pod
AWS sets four limits for each pod: 100 Mbit/s of network, 1,500 packets each second, 100 DNS lookups each second and 1,500 disk operations each second. Each limit has an initial allowance. A short job uses only the allowance and is not slower. A long job uses all of the allowance. Then the limit makes the job slow.
Caution: bandwidth and packets have two different limits. Remove only the bandwidth limit: 88 MB/s. Remove only the packet limit: 12 MB/s. Remove the two limits: 2,843 MB/s. Set each limit with a pod annotation. AWS reads the annotation only when the pod starts.
every number abovethe default limits and the annotationswhy: to prevent one pod from using all of the node's disk and network
Each pod starts 2.5 s later: the VM must start
A container is a process. A Nitro pod must start its own kernel first. The first time a pod uses an image, the node also copies the image into the VM.
5.0 s and 2.5 s with a cached image; approximately 6 s for each 500 MB the first timethe division into start and copy is our estimate
Two results look good but are not
the pod disk ignores flushes, EBS obeys them · 49% and 65%request CPUs in multiples of two
Not known: memory copy is at approximately half speed (7.7 and 13.9 GB/s). A possible cause is that the VM has no huge pages. We did not test this.
Nitro has two modes: the difference is trust, not speed
Steps 1 to 4 apply to the two modes. The speed of work in the pod is almost the same in each mode. The modes differ in who the pod must trust.
| What the mode costs | Isolated | Confidential |
|---|---|---|
| Memory reserved for each pod | 256 MiB | 512 MiB |
| Pods on our node (1 CPU / 2 GiB, burstable) | 5 | 4 |
| Start with a cached 2 GB image | 5.0 s | 36.2 s |
| A policy for each pod specification | not necessary | necessary |
| exec, logs and process list from outside | permitted | refused by the standard policy |
Confidential mode starts slowly because the node copies the image into the encrypted pod disk again for each pod. Isolated mode keeps the copy.
"Limits off" is not a mode. It is isolated mode with the pod annotations from step 2. Our confidential numbers are not the standard policy. Our policy permits exec, because the benchmark needs it.
256 and 512 MiB · 5 and 4 pods · 5.0 s and 36.2 s · KMS gave the secret only to the pod with the correct policythe two modes and their trust models
All tables for this page
Phase 1 · micro-benchmarks
Scorecard: times slower than runc
1.0 is runc's speed on the same node. 5× means five times slower, 0.5× twice as fast. "same" means the 95% range of the ratio includes 1.0. Nitro columns are against runc on the EKS node; the others are against runc on the kubeadm node of the same type. Those two plain containers are not identical (on EKS, saves to disk were about 1.7× faster and a pod start about 2 s slower), so compare across the dividing line with care. Pod start is shown as seconds added, because most of a short pod's time is Kubernetes' own work.
| Task | Nitro default limits | Nitro limits off | Nitro confidential (exec-enabled policy) | Sysbox | gVisor | Kata QEMU | Kata Cloud Hyp. | Kata Dragonball |
|---|---|---|---|---|---|---|---|---|
| Start a pod, run one command (seconds added) | +3.1 s | – | +9.6 s | +1.2 s | same | +2.4 s | +1.4 s | +3.2 s |
| Cheapest kernel call | 1.04× | 1.03× | 1.03× | 1.23× | 73× | 0.73× | 0.77× | 0.73× |
| Open and close a file | 0.96× | same | same | 0.94× | 7.2× | 195× | 185× | 0.64× |
| Unpack node_modules (11,596 files) | same | same | same | 0.93× | 7.1× | 66× | 62× | 147× |
| Clone a repo from a local copy | 0.88× | same | same | same | 8.1× | 39× | 46× | 67× |
| Create 4,000 small files | 0.89× | 0.89× | 0.89× | same | 5.0× | 39× | 39× | 170× |
| Save each write before the next (pod's own disk) | 45× | 1.09× † | 57× | 1.02× | 0.16× | 3.9× | 3.6× | 13× |
| Save each write before the next (EBS) | 0.87× | same | – | – | – | – | – | – |
| Read and write at random spots (volume) | 8.7× | 0.35× † | 7.8× | same | 0.10× | 1.09× | 1.45× | 4.3× |
| Read and write at random spots (EBS) | 0.07× † | 0.07× † | – | – | – | – | – | – |
| Write a big file (volume) | 7.1× | 0.10× † | 7.1× | 0.95× | same | 0.87× | same | 1.74× |
| Write a big file (EBS) | 1.03× | same | – | – | – | – | – | – |
| Read a big file (volume) | 75× | 1.17× | 74× | same | 0.38× | 1.27× | 1.21× | 3.7× |
| Send to the node, one stream | limited ‡ | 2.21× | limited ‡ | same | 5.4× | 9.6× | 44× | 24× |
| Receive from the node, one stream | limited ‡ | 2.96× | limited ‡ | same | 5.5× | 3.4× | 14× | 5.1× |
| Many small messages | 5.4× | same | 5.4× | same | 10× | 5.3× | 1.63× | 1.10× |
- The red cells in the default column are the limits: network 100 Mbit/s each way (about 14 MB/s measured) and 1,500 packets/s; disk 50 MB/s and 1,500 operations/s. They are not overhead from the VM.
- ‡ The one-stream network test moves data between a pod and its own node through memory, where runc reaches about 8 GB/s. Against a 14 MB/s limit that works out near 570×, which says nothing useful. Real downloads and installs in the same pods were 5–10× slower (section 4).
- With limits off, the network is 2–3× slower than runc. That is still the best VM result we have, ahead of every Kata engine.
- Kata-Firecracker is not in the table: on m8id we only have it with flushes dropped. With flushes honoured (K30, on m8i/EBS) it did 0.2× runc's forced writes, 0.08× upload and 0.29× download.
Data: bench/results/nitro/README.md · eks-auto-*.jsonl · bench/results/full/m8id.xlarge
Phase 2 · startup breakdown
Starting a pod: where the time goes
Time from creating the pod until it is Ready, measured from outside the cluster (API round trips included, for runc too). Images are busybox plus one random-data layer; "uncached" is a brand-new image every trial, "cached" is the same image again. n = 3 uncached, 10 cached.
| Image | runc | Nitro isolated | Nitro, limits off | Nitro confidential (exec-enabled policy) | Image download (node) |
|---|---|---|---|---|---|
| 50 MB, cached | 2.5 s | 5.0 s | 4.9 s | 5.8 s | – |
| 500 MB, cached | 2.5 s | 4.9 s | 4.9 s | 11.8 s | – |
| 2 GB, cached | 2.5 s | 5.0 s | 5.3 s | 36.2 s | – |
| 50 MB, never seen | 3.4 s | 6.5 s | 6.0 s | 6.8 s | 0.8–1.1 s |
| 500 MB, never seen | 10.0 s | 15.5 s | 16.1 s | 18.7 s | 7.4 s |
| 2 GB, never seen | 32.4 s | 60.2 s | 60.3 s | 70.4 s | ~30 s |
- The VM adds about 2.5 s to every start. The sandbox is up 3 s after creation (runc: 1 s).
- Limits do not touch startup. The node pulls the image at runc's speed, about 70 MB/s from ECR, and "limits off" matches the default.
- The first use of an image costs extra: about 6 s per 500 MB, 27 s for 2 GB, to load the image into the VM.
- Isolated mode caches the loaded image, so a second pod starts in 5 s at any size. Confidential mode does not: it unpacks into each pod's encrypted disk every time.
- Phase 1 with our 146 MB bench image: runc 3.8–4.2 s, isolated 7.3 s, confidential 13.8 s (that ran every confidential pod through policy generation first).
Data: bench/results/nitro/phase2/startup/
Phase 2 · limits
Which limit slows real work
A fresh pod per variant, 3 rounds, medians. Real internet tasks from us-east-2 (npm registry, PyPI, GitHub). Grey is runc, pink is Nitro with default limits, green is Nitro with only the limit named on the right lifted.
| Bulk traffic | runc | Nitro default | bandwidth off | packets/s off | both off |
|---|---|---|---|---|---|
| TCP, 8 streams | 8,459 MB/s | 16 MB/s | 88 MB/s | 12 MB/s | 2,843 MB/s |
| Tiny UDP packets received | 478,481 /s | 1,977 /s | 1,992 /s | 134,561 /s | 288,948 /s |
- Many small files hit the disk limit (1,500 operations/s), not the network.
overlay-disk-iopsandoverlay-disk-bandwidthfix it. - Many new connections hit the DNS limit (100 lookups/s, about 1 in 10 times out after 5 s).
dns-packets-per-secondfixes it. - Bulk transfer needs bandwidth and packet rate lifted together, because they are separate limits. The packet-rate limit counts each ~64 KB offloaded super-packet as one packet: bandwidth-only gives 95 MB/s with the guest's offloads on and 14.0 MB/s with them off (1,500/s × 9,001 bytes). That was a single rerun, so treat it as low-n.
- All annotations take the
sandbox.amazonaws.com/prefix and are read once, when the pod is created.
Data: bench/results/nitro/phase2/network/
Phase 2 · storage limits
Storage: the limits that apply
| Limit | runc (same node) | Nitro isolated |
|---|---|---|
| Pod's own disk + every emptyDir, default | whole NVMe, 221 GiB | 10 GiB, then "no space left" |
| Same, with an ephemeral-storage request of 40Gi | 221 GiB (eviction later) | 40 GiB: the request sizes the disk |
| emptyDir sizeLimit 1Gi, 2 GiB written | evicted | not enforced, keeps running |
| EBS volumes on one pod | 24 start | 9 max (10: "no drives available") |
| Grow a mounted volume 10 → 20 GiB | 20 GiB after 2 min | not supported, stays 10 GiB |
| EBS 16,000 IOPS: random 4 KB reads, 32 at once | 16,499 /s | 1,767 /s |
| EBS 1,000 MB/s: big reads | 1,027 MB/s | 311 MB/s |
| EBS 1,000 MB/s: big writes | 1,035 MB/s | 1,056 MB/s (reaches EBS: node counters 905 MB/s in a recheck) |
| EBS: random writes, each saved | 1,119 /s | 1,073 /s |
| Disk limit raised to 10G / 1,000,000 | – | 4,561 MB/s, 259,092 IOPS † |
- The sandbox sends EBS reads one at a time (Firecracker's
io_engine: Sync), so provisioned IOPS above about 1,800 cannot be used for reads. Big writes do reach the provisioned 1,000 MB/s: the EBS device's own write counters on the node confirmed it during the run. - Few runs: every storage cell is a single run. The pass/fail limits are deterministic; the throughput numbers would need repeats.
- A raised disk limit shows page-cache speed, above what the NVMe can do. Raising it effectively removes it.
Data: bench/results/nitro/phase2/storage/
Phases 1 and 2 · flushes
Durability: what an fsync means
| Disk · 4 KB writes per second | raw, no save | save each write | save each write, direct | flushes |
|---|---|---|---|---|
| runc · local NVMe | 37,495 | 32,705 | 32,777 | real (NVMe has no volatile cache) |
| runc · EBS gp3 | 1,145 | 363 | 365 | real |
| Nitro · own disk, default limit | 1,755 | 770 | 772 | dropped (cache_type Unsafe) |
| Nitro · own disk, limits off | 37,288 | 33,559 † | 36,708 † | dropped |
| Nitro · EBS gp3 | 38,497 † | 502 | 509 | honoured (Writeback) |
| Nitro confidential · own disk | 1,767 | 610 | 611 | dropped (under dm-crypt) |
- AWS documents the pod's own disk as ephemeral ("lost when the sandbox stops") but does not mention flushes. The cache setting was read from Firecracker's own configuration on the node.
- A container restart behaves like runc: the container's own files are reset and emptyDir data survives.
- Use EBS, EFS or S3 for anything that must survive.
Data: bench/results/nitro/firecracker-config.jsonl · phase2/durability/
Phase 2 · compute
CPU, memory and noisy neighbours
| Task, one pod alone | runc | isolated | confidential (exec-enabled policy) |
|---|---|---|---|
| Hashing (SHA-256) | 1,827 MB/s | 1,822 | 1,822 |
| Encryption (AES-GCM) | 5,414 MB/s | 5,400 | 5,406 |
| JavaScript loop | 1.04 s | 1.07 s | 1.04 s |
| Python loop | 1.19 s | 1.27 s | 1.25 s |
| Copy memory | 13.9 GB/s | 7.7 GB/s | 7.8 GB/s |
| Allocate 1 GiB | 0.35 s | 0.34 s | 0.60 s |
| Busy pods at once · hashing MB/s per pod | 1 | 2 | 3 | 4 |
|---|---|---|---|---|
| runc | 1,825 | 1,825 | – | 1,185 |
| Nitro isolated | 1,803 | 1,760 | – | 893 |
| Nitro confidential | 1,765 | 1,739 | 1,001 | – |
- Compute is native; memory copying runs at about half speed (a likely cause is that the guest has no huge pages; we did not test that).
- The node has 2 cores with 2 threads each. Two sandboxes never share a core's threads, so with 4 busy pods each sandbox gets 49% while runc gets 65%. That is about 25% less total work.
- On SMT instances, give sandboxes whole cores (2 vCPU), as AWS recommends.
- Few runs: each noisy-neighbour cell is one 20-second run.
Data: bench/results/nitro/phase2/cpu/
Phase 2 · our workloads
Docker inside, KVM, real scenarios
| Scenario step | runc | Nitro default | Nitro limits off |
|---|---|---|---|
| S1 · clone a repo with 1 GB of LFS files | 8.6 s | 83.3 s | 6.8 s |
| S2 · Docker inside pulls node:22 | 15.6 s | 76.2 s | 14.7 s |
| S2 · first docker run | 0.6 s | 28.9 s | 0.7 s |
| S3 · npm ci, 35,000 files, local registry | 13.6 s | 11.9 s | 10.8 s |
| Kernel call inside the inner Docker | 91 ns | 93–96 ns | 93 ns |
| Unpack node_modules inside the inner Docker | 0.44 s | 0.41 s | 0.41 s |
- Docker inside a privileged sandbox works at runc speed. "Privileged" means privileged in the guest VM, with no host devices.
- Downloads inside the pod are limited, unlike the pod's own image: an inner docker pull and an LFS clone are about 5–10× slower with the defaults.
- No /dev/kvm in any mode (runc included), so no Android emulator or nested VMs in a pod.
- S4 (production build) was not measured: it now fails for runc too, because the rebuilt image picked up newer dependencies.
- Few runs: each scenario cell is the median of 2 runs.
Data: bench/results/nitro/phase2/workloads/ · phase2/scenarios/
Phase 2 · confidential mode
Confidential mode: cost and the KMS demo
| What it costs | isolated | confidential |
|---|---|---|
| Memory reserved per pod | 256 MiB | 512 MiB |
| Burstable pods per node | 5 | 4 |
| Start, cached 2 GB image | 5.0 s | 36.2 s |
| Saves per second, own disk | 770 | 610 |
| Needs a policy per pod spec | no | yes |
| Who asked KMS to decrypt | result |
|---|---|
| Confidential pod with the pinned policy | decrypted, secret matched |
| Same, one field changed (other PCR17) | refused |
| Isolated pod, same IAM role (can attest too) | refused |
| runc pod, same IAM role | refused (no /dev/nsm) |
| Any pod, without an attestation document | refused |
The KMS key policy required both PCR17 (the hash of that one pod's policy) and PCR8 service name eks.amazonaws.com. KMS never returned the secret in the clear: it came back encrypted to a key generated inside the pod. Our confidential pods ran with a custom policy that allows exec so the benchmark could drive them; the stock policy denies it, so a locked-down pod was not benchmarked.
Data: bench/results/nitro/phase2/attestation/
Phases 1 and 2
Cost and density
| 1 CPU / 2 GiB pods on one m8id.xlarge | runc | Nitro isolated | Nitro confidential (exec-enabled policy) |
|---|---|---|---|
| CPU reserved (request = limit) | 3 · $0.097/pod-h | 3 · $0.097/pod-h | 3 · $0.097/pod-h |
| Small CPU request (memory decides) | 6 · $0.049/pod-h | 5 · $0.058/pod-h | 4 · $0.073/pod-h |
- Nitro Sandboxes cost nothing extra. You pay for the instance ($0.261/h), the Auto Mode fee ($0.031/h) and the cluster ($0.10/h).
- One run: one density run per cell. The counts follow from requests and overhead, so they should repeat.
- Confidential fits one pod fewer than its memory overhead predicts. The scheduler reports insufficient memory. System pods on the node also reserve memory, which may account for it; we did not confirm that.
- The whole study cost under $5 in AWS charges.
Read with care
Caveats
- One node type (m8id.xlarge, Intel, SMT) in one Region; Firecracker 1.17.0 and guest image 2026.10.31 as Auto Mode shipped them on launch day.
- Startup times are measured from outside the cluster through the public API, so absolute numbers include round trips. Nitro and runc were measured the same way on the same cluster, so that comparison holds. The other runtimes ran on kubeadm nodes, where a plain pod starts about 2 s sooner (1.9 s against 4.1 s), so compare seconds added rather than totals.
- Cells marked † measure the node's page cache, because flushes are dropped or the drive is not opened with O_DIRECT.
- Sample sizes are small: 3 measured rounds in phase 1, 3 for limits, 2 for scenarios, 10 for cached startup, and 1 for storage, noisy neighbours, density and the reruns.
- Corrected after a check against the raw data: images are pulled by the node, not inside the VM; the bandwidth-only result comes from offloaded super-packets; EBS big writes are real.
- Not done: the agent-sandbox warm pool, the S4 production build, a hard VM kill mid-write, images bigger than 2 GB.