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.

Kata on a cloud node two VMs, one in the other Your code The pod kernel VM 2: Kata starts it The node VM 1: AWS starts it Hardware each request goes through two VMs Nitro sandbox one VM, adjacent to the node Your code The pod kernel The only VM: AWS starts itadjacent to the node, not in it Hardware one VM
same as a container83 vs 80 nsThe fastest kernel call. The pod kernel answers it. The request stays in the VM.
same as a containerwithin 12%Unpack node_modules, clone a repo, create 4,000 small files. The files are on the pod disk, in the VM. With the Kata shared folder, the same unpack is 66× slower.
the cost of two VMs for Kata7.3× → 3.9×Kata sends data 7.3× slower on a cloud node (two VMs) and 3.9× slower on a full server (one VM). Nitro with no limits: 2.2×.

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.

Shallow clone of a big repodisk limit 6.2 s container 33.5 s Nitro, default limits 7.1 s limit removed 200 new HTTPS connectionsDNS limit 8.3 s 37.4 s 6.4 s npm ci, a short jobuses only the allowance 5.0 s 4.1 s

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.

Container Kubernetes · 2.5 s Nitro, image used before start the VM · +2.5 s Nitro, new 500 MB image copy the image · approximately 6 s

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

not durableWrites to the pod disk look very fastThe pod disk ignores the flush request (fsync). Thus a failure can lose the data. An EBS volume obeys the request. Put the database on an EBS volume.
no shared coresBusy pods get less CPU than containersTwo pods do not share the two threads of a CPU core. Four busy pods on two cores get 49% of a CPU each. Containers get 65%. Request CPUs in multiples of two.

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.

isolated-sandboxIsolated mode: the pod trusts the nodeThe VM protects the node and the other pods from the code in the pod. The node operator can see into the pod. Use this mode to run code that you do not trust.
confidential-sandboxConfidential mode: the pod does not trust the nodeA policy for each pod controls what the node can do to the pod. The pod disk is encrypted. The pod can prove what it is, and then KMS gives a secret only to that pod. Use this mode to hide data from the node operator.
What the mode costsIsolatedConfidential
Memory reserved for each pod256 MiB512 MiB
Pods on our node (1 CPU / 2 GiB, burstable)54
Start with a cached 2 GB image5.0 s36.2 s
A policy for each pod specificationnot necessarynecessary
exec, logs and process list from outsidepermittedrefused 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.

fastersame or within 25%1.25–3×3× or more† measures a cache, not the disk; ‡ held at the default network limit
TaskNitro
default limits
Nitro
limits off
Nitro
confidential
(exec-enabled policy)
SysboxgVisorKata
QEMU
Kata
Cloud Hyp.
Kata
Dragonball
Start a pod, run one command (seconds added)+3.1 s–+9.6 s+1.2 ssame+2.4 s+1.4 s+3.2 s
Cheapest kernel call1.04×1.03×1.03×1.23×73×0.73×0.77×0.73×
Open and close a file0.96×samesame0.94×7.2×195×185×0.64×
Unpack node_modules (11,596 files)samesamesame0.93×7.1×66×62×147×
Clone a repo from a local copy0.88×samesamesame8.1×39×46×67×
Create 4,000 small files0.89×0.89×0.89×same5.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×same0.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×same0.87×same1.74×
Write a big file (EBS)1.03×same––––––
Read a big file (volume)75×1.17×74×same0.38×1.27×1.21×3.7×
Send to the node, one streamlimited ‡2.21×limited ‡same5.4×9.6×44×24×
Receive from the node, one streamlimited ‡2.96×limited ‡same5.5×3.4×14×5.1×
Many small messages5.4×same5.4×same10×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.

ImageruncNitro isolatedNitro, limits offNitro confidential (exec-enabled policy)Image download (node)
50 MB, cached2.5 s5.0 s4.9 s5.8 s–
500 MB, cached2.5 s4.9 s4.9 s11.8 s–
2 GB, cached2.5 s5.0 s5.3 s36.2 s–
50 MB, never seen3.4 s6.5 s6.0 s6.8 s0.8–1.1 s
500 MB, never seen10.0 s15.5 s16.1 s18.7 s7.4 s
2 GB, never seen32.4 s60.2 s60.3 s70.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.

Shallow clone of a big repo (TypeScript)fix: disk limit off
6.2 s
33.5 s
7.1 s
200 new HTTPS connectionsfix: DNS limit off
8.3 s
37.4 s
6.4 s
500 DNS lookupsfix: DNS limit off · 48 of 500 timed out by default
4.2 s
6.8 s
3.0 s
pip install (requests, numpy, pandas, boto3)fix: disk off helps most; all off 10.0 s
9.3 s
12.2 s
10.6 s
npm ci (TypeScript, ESLint, Jest, webpack, Babel)no penalty: fits in the limit is starting burst
5.0 s
4.1 s
4.2 s
Bulk trafficruncNitro defaultbandwidth offpackets/s offboth off
TCP, 8 streams8,459 MB/s16 MB/s88 MB/s12 MB/s2,843 MB/s
Tiny UDP packets received478,481 /s1,977 /s1,992 /s134,561 /s288,948 /s
  • Many small files hit the disk limit (1,500 operations/s), not the network. overlay-disk-iops and overlay-disk-bandwidth fix it.
  • Many new connections hit the DNS limit (100 lookups/s, about 1 in 10 times out after 5 s). dns-packets-per-second fixes 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

Limitrunc (same node)Nitro isolated
Pod's own disk + every emptyDir, defaultwhole NVMe, 221 GiB10 GiB, then "no space left"
Same, with an ephemeral-storage request of 40Gi221 GiB (eviction later)40 GiB: the request sizes the disk
emptyDir sizeLimit 1Gi, 2 GiB writtenevictednot enforced, keeps running
EBS volumes on one pod24 start9 max (10: "no drives available")
Grow a mounted volume 10 → 20 GiB20 GiB after 2 minnot supported, stays 10 GiB
EBS 16,000 IOPS: random 4 KB reads, 32 at once16,499 /s1,767 /s
EBS 1,000 MB/s: big reads1,027 MB/s311 MB/s
EBS 1,000 MB/s: big writes1,035 MB/s1,056 MB/s (reaches EBS: node counters 905 MB/s in a recheck)
EBS: random writes, each saved1,119 /s1,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 secondraw, no savesave each writesave each write, directflushes
runc · local NVMe37,49532,70532,777real (NVMe has no volatile cache)
runc · EBS gp31,145363365real
Nitro · own disk, default limit1,755770772dropped (cache_type Unsafe)
Nitro · own disk, limits off37,28833,559 †36,708 †dropped
Nitro · EBS gp338,497 †502509honoured (Writeback)
Nitro confidential · own disk1,767610611dropped (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 aloneruncisolatedconfidential (exec-enabled policy)
Hashing (SHA-256)1,827 MB/s1,8221,822
Encryption (AES-GCM)5,414 MB/s5,4005,406
JavaScript loop1.04 s1.07 s1.04 s
Python loop1.19 s1.27 s1.25 s
Copy memory13.9 GB/s7.7 GB/s7.8 GB/s
Allocate 1 GiB0.35 s0.34 s0.60 s
Busy pods at once · hashing MB/s per pod1234
runc1,8251,825–1,185
Nitro isolated1,8031,760–893
Nitro confidential1,7651,7391,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 stepruncNitro defaultNitro limits off
S1 · clone a repo with 1 GB of LFS files8.6 s83.3 s6.8 s
S2 · Docker inside pulls node:2215.6 s76.2 s14.7 s
S2 · first docker run0.6 s28.9 s0.7 s
S3 · npm ci, 35,000 files, local registry13.6 s11.9 s10.8 s
Kernel call inside the inner Docker91 ns93–96 ns93 ns
Unpack node_modules inside the inner Docker0.44 s0.41 s0.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 costsisolatedconfidential
Memory reserved per pod256 MiB512 MiB
Burstable pods per node54
Start, cached 2 GB image5.0 s36.2 s
Saves per second, own disk770610
Needs a policy per pod specnoyes
Who asked KMS to decryptresult
Confidential pod with the pinned policydecrypted, secret matched
Same, one field changed (other PCR17)refused
Isolated pod, same IAM role (can attest too)refused
runc pod, same IAM rolerefused (no /dev/nsm)
Any pod, without an attestation documentrefused

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.xlargeruncNitro isolatedNitro confidential (exec-enabled policy)
CPU reserved (request = limit)3 · $0.097/pod-h3 · $0.097/pod-h3 · $0.097/pod-h
Small CPU request (memory decides)6 · $0.049/pod-h5 · $0.058/pod-h4 · $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.