Keyboard shortcuts

Press ← or → to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Sizing

This page is for operators choosing CPU, memory and disk for a function-wasm pod. It gives the formulas first and the measurements they rest on after. Those are the module sizes and costs, by guest toolchain, that the formulas take as inputs.

What a request and a module cost depends on the guest’s toolchain, and the Measurements section gives the per-toolchain figures the formulas use.

Memory

Budget a pod’s memory as the sum of three terms:

  • the resident compiled modules;
  • --max-concurrent-compiles times the peak memory of compiling your largest module (about 1 GB for a large Go module, far less for Rust, per Measurements);
  • concurrent runs times the per-run figure (about 16 MB for a large Go module, per Measurements).

--max-concurrent-runs caps the third term, which is useful when the callers’ concurrency isn’t the number you want to size for.

Cold start

A cold start compiles every module once. --max-module-size bounds a compile’s input, --max-concurrent-compiles how many run at once (each about 1 GB at peak for a large Go module, per Measurements) and --module-compile-timeout how long one may take. The request’s own deadline doesn’t cut a compile short, so leave --max-concurrent-compiles times that peak in the pod’s memory limit. Every process compiles its modules again, with or without a volume. A volume under /tmp/function-wasm-cache keeps the fetched modules, and a restart pulls nothing. The compiled code is signed per process (cache storage). --warm-modules moves the compile ahead of readiness, as readiness describes.

Disk

Disk grows by one module and one compiled artifact per digest ever served, until --max-cache-size bounds it.

Throughput

Runs execute in parallel up to --max-concurrent-runs and a step’s limits.concurrency. The --max-total-run-memory pool bounds how many can hold their memory at once, as runtime flags describes. A large observed state costs on every request whatever the guest is.

Measurements

The figures below were measured on 2026-08-16 on linux/arm64, on the Go host with ABI v1 guests, and weren’t re-measured on the Rust host, so treat them as a rough scale.

Go (~75 MB)Go, raw proto (~20 MB)Rust (~240 KB)
one request (CPU)8-11 ms1.2 ms0.05 ms
first compile of a module23-28 CPU-seconds, ~1 GB peak6 CPU-s0.1 CPU-s
resident in memory~90 MB, file-backed~40 MB0.7 MB
per in-flight run11-16 MB4-8 MB< 1 MB
on disk per module version~230 MB (module + artifact)~60 MB0.9 MB
load from a warm volume6-8 ms2 ms0.05 ms

“Go” is the go scaffold and “Go, raw proto” a Go guest that uses only the scaffold’s own code, without function-sdk-go. The full model of bounds and budgets is in the resource governance one-pager.