Wasm vs Docker for Serverless: Benchmarks and Trade-offs
A close reading of the published serverless benchmarks — including a 2025 IEEE study showing Wasm 31.4% faster with 86.5% smaller images — plus the studies that contradict them.
Published on • November 15, 2026
AI Assistant

Benchmarks are the only way to settle the Wasm-vs-containers argument, and the published numbers are more nuanced — and more contradictory — than vendor slides suggest. The most-cited recent result comes from Chennubhotla et al., “Moving Past Docker for Serverless: WebAssembly for Kubernetes Clusters at the Edge” (IEEE, 2025): Wasm configurations ran 31.4% faster on average, consumed 59.5% less memory, and produced images 86.5% smaller than their Docker equivalents. Those are headline numbers. But a 2025 ACM TOSEM study found the opposite for startup time when Wasm ran through Docker’s own integration, and earlier edge studies report cold-start reductions of up to 99.5%. This post walks through what each benchmark actually measured, why they disagree, and how to read the trade-offs when choosing a runtime for serverless workloads.
What the 2025 IEEE study measured
The Chennubhotla et al. paper evaluates WebAssembly as an alternative to Docker containers for serverless functions deployed to Kubernetes clusters at the edge, comparing three metrics that matter most in resource-scarce environments:
| Metric | Result (Wasm vs Docker) |
|---|---|
| Execution time | 31.4% faster on average |
| Memory footprint | 59.5% less consumed |
| Image/artifact size | 86.5% smaller |
The setting explains the magnitude. Serverless functions are short-lived and ephemeral: a function that executes for 200 ms and sleeps for minutes spends most of its life in startup and teardown, where container overhead — pulling layers, mounting a rootfs, starting an init environment — dominates. A .wasm module skips all of it. The 86.5% size reduction is the arithmetic of shipping bytecode instead of a base image: no glibc, no shell, no package manager, just the module and its data.
Corroborating evidence from earlier benchmarks
The IEEE result sits in a consistent body of edge-serverless measurements:
- WOW (CCGrid 2022, TU Wien): a WebAssembly runtime integrated into Apache OpenWhisk reduced cold-start latency by up to 99.5%, improved memory use by more than 5×, and increased function throughput by up to 4.2× on edge hardware. On a server-class host, Docker cold starts measured 869–2873 ms while Wasm executors (Wasmtime, Wasmer, WAMR) landed at 47–180 ms. Per-warm-container memory: Docker 22.28 MiB vs WAMR 2.93 MiB, Wasmer 4.02 MiB, Wasmtime 6.34 MiB.
- Journal of Grid Computing (2023): a 13-function benchmark suite compared WasmEdge, Wasmer, and Wasmtime against containerd with distroless and distro-based images. Wasm runtimes won 10 of 13 tests, with Wasmtime fastest — but containers kept better compute performance for long-running, complex functions where cold start is negligible relative to execution time.
- PolyBench startup study (RTNS-adjacent, 2024): WAMR’s fast-JIT and multi-tier-JIT modes started in ~26 ms and Wasmtime in ~46 ms on average, with consistently predictable timing — a real-time systems consideration that raw averages hide.
The pattern across all three: Wasm’s advantage is largest exactly where serverless lives — short functions, cold starts, scale-to-zero, constrained edge nodes.
The contradictory result: when Wasm runs through containers
The 2025 ACM TOSEM paper “WebAssembly for Container Runtime: Are We There Yet?” found something striking: using Docker Desktop 4.28’s Docker+Wasm integration (Wasmtime 17.0, Wasmer 4.1.2), Wasm containers started 65–325 ms slower than plain Docker containers across 30 PolyBench/C benchmarks, with similar memory consumption. Their conclusion: Wasm containers gain nothing over Docker in startup and memory because they pay the containerization environment’s overhead plus a fixed Wasm runtime initialization cost.
Both studies are right — they measure different stacks:
- Native Wasm runtime (Wasmtime/WasmEdge invoked directly, or via a containerd shim that loads the module): near-zero startup, tiny memory. This is what the IEEE and edge studies measure.
- Wasm wrapped in a full container runtime pipeline: you inherit
dockerd/containerdimage handling, rootfs preparation, and cgroup setup before the Wasm runtime even initializes. The sandbox benefit survives; the speed benefit largely doesn’t.
A third datapoint, HybridServe (WoSC 2025), measured Wasm reducing cold start by up to 88.1% and image size by 99.17%, but executing 36.15% slower than containers and drawing 9.3% more power — and built an adaptive router that serves the first requests from Wasm while warming a container in the background.
Where the trade-offs actually land
Choosing between Wasm and Docker for a serverless platform means matching the runtime to the workload profile:
Choose Wasm when:
- Function execution is short (milliseconds to low seconds) and cold-start latency is on the critical path.
- Density matters: you need hundreds of concurrent function instances per node at the edge.
- Artifacts cross networks frequently — an 86.5% smaller image is an 86.5% faster pull over a congested edge link.
- You need per-invocation sandboxing of untrusted code (user-supplied functions, plugin logic).
Choose containers when:
- Execution time dominates (ETL jobs, video encoding, model inference batches) — steady-state compute parity favors native code, and Wasm’s JIT/AOT tiering hasn’t closed the gap for sustained workloads.
- The workload needs OS features the sandbox doesn’t expose: arbitrary sockets in some configurations, specific device access, or a full distro’s runtime (JVM, Python C extensions).
- Your toolchain assumes Linux userspace — most existing serverless functions were written that way and would need recompilation, not just repackaging.
The pragmatic architectures emerging from this evidence are hybrid: Wasm as the cold-path executor, containers as the warm-path workhorse, with a scheduler deciding per request — exactly the HybridServe design.
How to benchmark your own workload
Before adopting anyone’s numbers, reproduce them against your functions. The methodology that keeps studies comparable:
- Separate cold and warm measurements. Report time-to-first-byte for a genuinely cold instance (all instances evicted) and steady-state p50/p95 separately. Mixing them hides the crossover point.
- Measure the full pipeline, including image/artifact pull, runtime init, and application init — the TOSEM result exists because many studies stopped at runtime init.
- Use function-sized workloads. PolyBench/C kernels and 13-function suites approximate; your production functions with their real dependencies are the only honest test.
- Fix the artifact path. Compare a distroless Docker image against a
.wasmmodule built with the same toolchain and optimization flags — a full Ubuntu base image vs an optimized module inflates Wasm’s win artificially. - Track memory at steady state and peak. Serverless billing and node density depend on both.
The verdict
For serverless at the edge, the benchmark consensus is real: Wasm starts faster, fits more instances per node, and ships dramatically smaller artifacts — 31.4% faster, 59.5% less memory, 86.5% smaller in the 2025 IEEE study, with cold-start collapses from seconds to tens of milliseconds in earlier work. But the advantage is conditional: it evaporates when you route Wasm through a heavyweight container pipeline, and it inverts for long-running compute-heavy functions where containers’ native execution wins. The question isn’t “Wasm or Docker?” — it’s “per function, which runtime profile fits?” The platforms answering that per request, not per deployment, are the ones the next round of benchmarks will reward.
References
- A. Chennubhotla et al., “Moving Past Docker for Serverless: WebAssembly for Kubernetes Clusters at the Edge”, 2025 IEEE — https://ieeexplore.ieee.org/document/11030528
- “WebAssembly as an Enabler for Next Generation Serverless Computing”, Journal of Grid Computing, 2023 — https://link.springer.com/article/10.1007/s10723-023-09669-8
- “Pushing Serverless to the Edge with WebAssembly Runtimes”, IEEE/ACM CCGrid 2022 — https://dsg.tuwien.ac.at/team/sd/papers/CCGrid_2022_P_Frangoudis_Pushing.pdf
- “WebAssembly for Container Runtime: Are We There Yet?”, ACM TOSEM, 2025 — https://dl.acm.org/doi/full/10.1145/3712197
- “HybridServe: Adaptive WebAssembly-Container Runtime Selection for Edge Serverless Computing”, WoSC 2025 — https://leeky.me/publications/hybridserve.pdf