Benchmarks
How far one engine goes
Every release, we put the iii engine alone in virtual machines of fixed size and drive it with real SDK workers until it stops keeping up. These are the results: what each size sustains, what it costs in CPU and memory on the way, and where it runs out.
- Engine
- iii 0.25.0
- Measured
- Oct 20, 2026
- Machine
- Local workstation, 16 CPUs
- Sizes
- 3 VMs and the host, 8 scenarios
Pick a machine size
Every figure and chart below follows it. The other sizes stay in the charts, behind, to compare.
- Calls per second through the engine
- 97 k/s
- Worker to engine to worker and back, 512 calls in flight. p99 17 ms.
- Engine CPU per call
- 20 µs
- About 51k calls a second for each core the engine has.
- Observer activations per second, sustained
- 50 k/s
- Every event delivered. Offer 100 k/s and 74% arrive; the rest is dropped, and counted.
- Calls a worker makes to its own functions
- 4.7 M/s
- In-process, unobserved: the engine spends 0.00 CPU on them.
- Engine memory per connected worker
- 161 KiB
- 5,000 idle workers held: 786 MiB on top of 40 MiB at rest.
- Engine memory per observer
- 10 KiB
- 64,000 observers held: 638 MiB.
AMD Ryzen 7 9800X3D 8-Core Processor · 16 CPUs. A size of N vCPU · M is the engine with N virtual CPUs and an M memory cap, the load generator beside it on 6 vCPUs of its own; how we measure.
Calls
Calls through the engine
A worker calls a function another worker hosts. The call goes to the engine, the engine routes it to the host, and the answer comes back the same way: four WebSocket frames per call.
Callers keep more and more calls in flight, from 1 to 2,048. Throughput grows while the engine has CPU to spare, up to a peak: the size’s capacity.
| Size | Peak | p99 there | CPU per call |
|---|---|---|---|
| 1 vCPU · 512 MiB | 63 k/s | 351 ms | 16 µs |
| 2 vCPU · 1 GiB | 97 k/s | 17 ms | 20 µs |
| 4 vCPU · 2 GiB | 171 k/s | 6.2 ms | 22 µs |
| Host · 8 CPUs | 424 k/s | 8.3 ms | 15 µs |
Calls per second, by calls in flight
64-byte payloads. Each size gets a fresh engine.
| Machine | Calls in flight | Calls per second |
|---|---|---|
| 1 vCPU | 1 | 4.1k |
| 1 vCPU | 8 | 15k |
| 1 vCPU | 32 | 28k |
| 1 vCPU | 128 | 46k |
| 1 vCPU | 512 | 55k |
| 1 vCPU | 2,048 | 63k |
| 2 vCPU | 1 | 3.6k |
| 2 vCPU | 8 | 28k |
| 2 vCPU | 32 | 61k |
| 2 vCPU | 128 | 85k |
| 2 vCPU | 512 | 97k |
| 2 vCPU | 2,048 | 92k |
| 4 vCPU | 1 | 3.6k |
| 4 vCPU | 8 | 27k |
| 4 vCPU | 32 | 97k |
| 4 vCPU | 128 | 160k |
| 4 vCPU | 512 | 171k |
| 4 vCPU | 2,048 | 152k |
| Host | 1 | 28k |
| Host | 8 | 119k |
| Host | 32 | 219k |
| Host | 128 | 330k |
| Host | 512 | 403k |
| Host | 2,048 | 424k |
p99 latency, by calls in flight
| Machine | Calls in flight | p99 latency |
|---|---|---|
| 1 vCPU | 1 | 289 µs |
| 1 vCPU | 8 | 769 µs |
| 1 vCPU | 32 | 2 ms |
| 1 vCPU | 128 | 4.5 ms |
| 1 vCPU | 512 | 70 ms |
| 1 vCPU | 2,048 | 351 ms |
| 2 vCPU | 1 | 313 µs |
| 2 vCPU | 8 | 401 µs |
| 2 vCPU | 32 | 878 µs |
| 2 vCPU | 128 | 2.6 ms |
| 2 vCPU | 512 | 17 ms |
| 2 vCPU | 2,048 | 66 ms |
| 4 vCPU | 1 | 313 µs |
| 4 vCPU | 8 | 416 µs |
| 4 vCPU | 32 | 574 µs |
| 4 vCPU | 128 | 1.4 ms |
| 4 vCPU | 512 | 6.2 ms |
| 4 vCPU | 2,048 | 30 ms |
| Host | 1 | 65 µs |
| Host | 8 | 146 µs |
| Host | 32 | 464 µs |
| Host | 128 | 1 ms |
| Host | 512 | 2.4 ms |
| Host | 2,048 | 8.3 ms |
Observers
What observing a function costs
Every function is observable. Here each called function gains 1 to 64 observers without a filter, so every call activates all of them, fire-and-forget, while 64 callers keep calling.
An activation is a call the engine makes on its own, and it costs about as much as one. So the engine splits the same CPU between the calls and their activations: the more observers per call, the fewer calls fit.
Activations per second, by observers per function
| Machine | Observers per function | Activations per second |
|---|---|---|
| 1 vCPU | 1 | 26k |
| 1 vCPU | 4 | 39k |
| 1 vCPU | 16 | 71k |
| 1 vCPU | 64 | 51k |
| 2 vCPU | 1 | 43k |
| 2 vCPU | 4 | 39k |
| 2 vCPU | 16 | 38k |
| 2 vCPU | 64 | 32k |
| 4 vCPU | 1 | 60k |
| 4 vCPU | 4 | 119k |
| 4 vCPU | 16 | 178k |
| 4 vCPU | 64 | 144k |
| Host | 1 | 110k |
| Host | 4 | 326k |
| Host | 16 | 308k |
| Host | 64 | 217k |
The observed calls, by observers per function
| Machine | Observers per function | Calls per second |
|---|---|---|
| 1 vCPU | 0 | 40k |
| 1 vCPU | 1 | 26k |
| 1 vCPU | 4 | 9.8k |
| 1 vCPU | 16 | 6.3k |
| 1 vCPU | 64 | 5.1k |
| 2 vCPU | 0 | 81k |
| 2 vCPU | 1 | 43k |
| 2 vCPU | 4 | 35k |
| 2 vCPU | 16 | 34k |
| 2 vCPU | 64 | 29k |
| 4 vCPU | 0 | 135k |
| 4 vCPU | 1 | 78k |
| 4 vCPU | 4 | 30k |
| 4 vCPU | 16 | 47k |
| 4 vCPU | 64 | 44k |
| Host | 0 | 251k |
| Host | 1 | 222k |
| Host | 4 | 88k |
| Host | 16 | 70k |
| Host | 64 | 58k |
Delivery
How much it delivers in full
A source like cron or a database calls its event function (cron::on-tick, database::on-row-changed) for each event, and iii delivers each call to the observers whose args and filters match. We offer a steady rate, from 1k to 500k events a second over 16 observers, and count what arrives.
Up to some rate, everything does. That rate is the size’s sustained capacity, and past it the engine does not fall over: it delivers what it can and drops the rest, counted.
| Size | Sustained | Past it |
|---|---|---|
| 1 vCPU · 512 MiB | 50 k/s | 75% of 100 k/s |
| 2 vCPU · 1 GiB | 50 k/s | 74% of 100 k/s |
| 4 vCPU · 2 GiB | 100 k/s | 61% of 200 k/s |
| Host · 8 CPUs | 100 k/s | 90% of 200 k/s |
Activations delivered, by events offered
Per second, over 16 observers, on logarithmic scales: a line on the diagonal delivers everything.
| Machine | Events offered per second | Activations delivered per second |
|---|---|---|
| 1 vCPU | 1k | 999 |
| 1 vCPU | 5k | 5k |
| 1 vCPU | 20k | 20k |
| 1 vCPU | 50k | 50k |
| 1 vCPU | 100k | 69k |
| 2 vCPU | 1k | 1000 |
| 2 vCPU | 5k | 5k |
| 2 vCPU | 20k | 20k |
| 2 vCPU | 50k | 50k |
| 2 vCPU | 100k | 68k |
| 4 vCPU | 1k | 1000 |
| 4 vCPU | 5k | 5k |
| 4 vCPU | 20k | 20k |
| 4 vCPU | 50k | 50k |
| 4 vCPU | 100k | 100k |
| 4 vCPU | 200k | 115k |
| Host | 1k | 1000 |
| Host | 5k | 5k |
| Host | 20k | 20k |
| Host | 50k | 50k |
| Host | 100k | 100k |
| Host | 200k | 177k |
Filters
Filters at scale
Observers usually filter: a cron expression, a table, a tenant. Here one function has 16 to 4,000 observers, each filtering on a different value, and every call matches exactly one of them.
What grows is the filtering, not the deliveries: the engine checks every observer’s filter on every call to the function.
Calls per second, by filtered observers on the function
| Machine | Filtered observers | Calls per second |
|---|---|---|
| 1 vCPU | 16 | 20k |
| 1 vCPU | 256 | 19k |
| 1 vCPU | 1,024 | 14k |
| 1 vCPU | 4,000 | 5.6k |
| 2 vCPU | 16 | 40k |
| 2 vCPU | 256 | 36k |
| 2 vCPU | 1,024 | 29k |
| 2 vCPU | 4,000 | 24k |
| 4 vCPU | 16 | 60k |
| 4 vCPU | 256 | 59k |
| 4 vCPU | 1,024 | 64k |
| 4 vCPU | 4,000 | 58k |
| Host | 16 | 153k |
| Host | 256 | 159k |
| Host | 1,024 | 164k |
| Host | 4,000 | 124k |
Memory
What it holds, and how much fits
The engine’s resident memory at rest as idle workers connect and observers pile up. Each VM size’s memory cap is drawn across: where a line would cross it, that size runs out.
| Size | Idle workers | Observers |
|---|---|---|
| 1 vCPU · 512 MiB | ~2,900 fit | ~46,000 fit |
| 2 vCPU · 1 GiB | ~6,300 fit | ~99,000 fit |
| 4 vCPU · 2 GiB | ~12,600 fit | ~262,000 fit |
| Host · 8 CPUs | 168 KiB each | 8 KiB each |
Fits: the size’s cap, less the engine at rest, over the measured cost of one. Real workers register more functions, and real observers carry bigger filters.
Engine memory, by idle workers connected
Each worker announces itself and registers two functions, then only answers pings.
| Machine | Idle workers | Resident memory |
|---|---|---|
| 1 vCPU | 0 | 38 MiB |
| 1 vCPU | 100 | 58 MiB |
| 1 vCPU | 1,000 | 200 MiB |
| 2 vCPU | 0 | 38 MiB |
| 2 vCPU | 100 | 58 MiB |
| 2 vCPU | 1,000 | 201 MiB |
| 2 vCPU | 5,000 | 825 MiB |
| 4 vCPU | 0 | 38 MiB |
| 4 vCPU | 100 | 59 MiB |
| 4 vCPU | 1,000 | 204 MiB |
| 4 vCPU | 5,000 | 837 MiB |
| 4 vCPU | 10k | 1.6 GiB |
| Host | 0 | 43 MiB |
| Host | 100 | 63 MiB |
| Host | 1,000 | 213 MiB |
| Host | 5,000 | 864 MiB |
| Host | 10k | 1.6 GiB |
Engine memory, by observers held
Spread over 16 functions, a small filter each, 1,000 per observing worker.
| Machine | Observers held | Resident memory |
|---|---|---|
| 1 vCPU | 0 | 39 MiB |
| 1 vCPU | 1,000 | 52 MiB |
| 1 vCPU | 4,000 | 77 MiB |
| 1 vCPU | 16k | 205 MiB |
| 2 vCPU | 0 | 40 MiB |
| 2 vCPU | 1,000 | 50 MiB |
| 2 vCPU | 4,000 | 78 MiB |
| 2 vCPU | 16k | 198 MiB |
| 2 vCPU | 64k | 678 MiB |
| 4 vCPU | 0 | 40 MiB |
| 4 vCPU | 1,000 | 50 MiB |
| 4 vCPU | 4,000 | 73 MiB |
| 4 vCPU | 16k | 183 MiB |
| 4 vCPU | 64k | 530 MiB |
| Host | 0 | 44 MiB |
| Host | 1,000 | 53 MiB |
| Host | 4,000 | 76 MiB |
| Host | 16k | 175 MiB |
| Host | 64k | 542 MiB |
Overload
When the targets are slow
Observers whose target takes 20 ms, behind calls that come far faster. Each observer runs 64 activations at a time and queues up to 1,024 more; past that, events are dropped and counted.
The calls hold at 64 in flight while slow observers are added: 4, 64, 256. Every one of them keeps a full queue. A queued event is held once, however many observers wait on it, and all the queues together are capped at 64 MiB of events.
Peak engine memory, by slow observers
| Machine | Slow observers on the function | Peak resident memory |
|---|---|---|
| 1 vCPU | 4 | 51 MiB |
| 1 vCPU | 64 | 104 MiB |
| 1 vCPU | 256 | 278 MiB |
| 2 vCPU | 4 | 52 MiB |
| 2 vCPU | 64 | 123 MiB |
| 2 vCPU | 256 | 329 MiB |
| 4 vCPU | 4 | 53 MiB |
| 4 vCPU | 64 | 137 MiB |
| 4 vCPU | 256 | 516 MiB |
| Host | 4 | 64 MiB |
| Host | 64 | 170 MiB |
| Host | 256 | 553 MiB |
Local calls
Calls that never leave the worker
A worker calling a function it hosts runs it in its own process. The engine hears about such a call only when an observer’s filter matches it, in batched reports.
16 tasks in one worker call its own function as fast as they can: unobserved, with an observer matching 1% of the calls, and with one matching them all.
Local calls per second
2 vCPU · 1 GiB
- Unobserved4.7 M/s
engine 0.00 CPU · nothing on the wire
- Observed, 1% match3.6 M/s
engine 0.95 CPU · 36 k/s activations delivered
- Observed, 100% match2.7 M/s
engine 1.12 CPU · 41 k/s activations delivered
Micro-benchmarks
Single paths, every release
Criterion timings of single code paths, in one process, on every release since v0.16.1: a standard GitHub runner, 4 cores. Lower is faster; each line is a benchmark’s history, and its last point is v0.28.0-rc.1, measured Dec 1, 2026.
WebSocket round trip
One call from a worker, through the engine, to another worker and back, over real sockets.
- invoke_echo50 µs15% faster
Observing a call
A call with N observers on it: default delivery reaches every one, filtered evaluates every filter and matches one. Fan-out is inside the time.
- default/0587 ns24% faster
- default/12.4 µs53% faster
- default/814 µs32% faster
- default/64104 µs37% faster
- filtered/162.5 µs51% faster
- filtered/2562.5 µs52% faster
- filtered/10242.6 µs50% faster
- filtered/40003.1 µs43% faster
Concurrent calls
N calls at once to a function hosted in the engine, waiting for all of them.
- 1858 ns25% faster
- 86.9 µs28% faster
- 3235 µs29% faster
- 128140 µs29% faster
Payload size
One call carrying 1 KB to 1 MB of JSON.
- 1kb605 ns25% faster
- 10kb786 ns32% faster
- 100kb2.8 µs53% faster
- 1mb37 µs63% faster
Registration churn
Registering and removing functions, workers and observers by the hundred and the thousand.
- functions_register_remove/10039 µs28% faster
- functions_register_remove/1000405 µs27% faster
- functions_register_remove/50002.1 ms34% faster
- observers_add_remove/100215 µs29% faster
- observers_add_remove/10001.9 ms27% faster
- observers_add_remove/50009.3 ms29% faster
- workers_register_unregister/100160 µs26% faster
- workers_register_unregister/10001.7 ms28% faster
- workers_register_unregister/500022 ms±7%
Channel relay2 benchmarks
- large_frame505 µs34% faster
- small_frame33 µs±9%
Core runtime1 benchmark
Calling a handler registered in the engine.
- engine_call_registered_handler905 ns21% faster
Key-value contention4 benchmarks
N writers on the same key at once.
- 1219 ns21% faster
- 4858 ns22% faster
- 163.3 µs23% faster
- 6420 µs24% faster
Key-value store10 benchmarks
Reads, writes, updates and listings in the built-in store.
- delete335 ns33% faster
- get_hit157 ns25% faster
- get_miss76 ns19% faster
- list_100_items28 µs27% faster
- list_groups137 ns28% faster
- list_keys_with_prefix192 ns26% faster
- set_overwrite267 ns30% faster
- update_increment229 ns25% faster
- update_merge457 ns36% faster
- update_set_field238 ns26% faster
Metrics accumulator2 benchmarks
- existing_function19 ns30% faster
- first_invocations11 µs21% faster
Observe activation ws18 benchmarks
- envelope/4KiB/1391 µs49% faster
- envelope/4KiB/162 ms30% faster
- envelope/4KiB/647.6 ms23% faster
- envelope/64KiB/14.6 ms49% faster
- envelope/64KiB/1618 ms25% faster
- envelope/64KiB/6468 ms23% faster
- envelope/256B/1110 µs46% faster
- envelope/256B/16777 µs42% faster
- envelope/256B/645.2 ms±9%
- input/4KiB/1298 µs48% faster
- input/4KiB/161.3 ms33% faster
- input/4KiB/645 ms24% faster
- input/64KiB/13.9 ms50% faster
- input/64KiB/1611 ms26% faster
- input/64KiB/6436 ms24% faster
- input/256B/181 µs36% faster
- input/256B/16619 µs40% faster
- input/256B/644.1 ms11% faster
Observe fanout4 benchmarks
- 120 µs33% faster
- 826 µs35% faster
- 3243 µs40% faster
- 128114 µs50% faster
Observe route lookup4 benchmarks
- hit/155 ns27% faster
- hit/1000055 ns25% faster
- miss/121 ns28% faster
- miss/1000031 ns37% faster
Observe routed15 benchmarks
- filtered/1655 µs47% faster
- filtered/25658 µs44% faster
- filtered/102460 µs42% faster
- filtered/400063 µs38% faster
- matched/155 µs48% faster
- matched/857 µs43% faster
- matched/64105 µs38% faster
- metadata_4k/168 µs44% faster
- metadata_4k/878 µs36% faster
- metadata_60b/159 µs44% faster
- metadata_60b/857 µs32% faster
- observed/052 µs29% faster
- observed/155 µs48% faster
- observed/857 µs36% faster
- observed/6496 µs41% faster
Protocol: decode7 benchmarks
Parsing each wire message from JSON.
- InvocationResult710 ns26% faster
- InvocationResult_Error334 ns21% faster
- InvokeFunction687 ns22% faster
- Ping63 ns17% faster
- Pong62 ns17% faster
- RegisterFunction324 ns17% faster
- WorkerRegistered185 ns±8%
Protocol: round trip7 benchmarks
Encoding and decoding each wire message.
- InvocationResult992 ns26% faster
- InvocationResult_Error505 ns23% faster
- InvokeFunction966 ns23% faster
- Ping62 ns19% faster
- Pong61 ns22% faster
- RegisterFunction375 ns21% faster
- WorkerRegistered298 ns±7%
Protocol: encode7 benchmarks
Turning each wire message into JSON.
- InvocationResult264 ns24% faster
- InvocationResult_Error153 ns25% faster
- InvokeFunction239 ns33% faster
- Ping12 ns48% faster
- Pong12 ns45% faster
- RegisterFunction82 ns18% faster
- WorkerRegistered99 ns29% faster
Pub/sub fan-out4 benchmarks
One message to N subscribers.
- 119 µs40% faster
- 826 µs44% faster
- 3264 µs52% faster
- 128236 µs55% faster
Worker cleanup9 benchmarks
Tearing down a worker that leaves with its functions and calls in flight.
- functions/102.7 µs34% faster
- functions/5012 µs28% faster
- functions/20050 µs24% faster
- invocations/10869 ns21% faster
- invocations/501.5 µs35% faster
- invocations/2004.3 µs29% faster
- observers/105.3 µs29% faster
- observers/5014 µs18% faster
- observers/20035 µs34% faster
Invocation tracking, concurrent4 benchmarks
The same with N calls at once.
- 1200 ns17% faster
- 81.4 µs18% faster
- 3211 µs22% faster
- 12849 µs23% faster
Invocation tracking2 benchmarks
Recording which worker each call belongs to.
- add_remove_sequential146 ns13% faster
- add_with_200_existing144 ns16% faster
Ws roundtrip payload sizes3 benchmarks
- 1kb53 µs14% faster
- 10kb79 µs15% faster
- 100kb365 µs16% faster
Method
How we measure
Everything on this page comes from one open-source tool that runs the same way on your machine as in CI, and every number links back to the run that produced it.
microVM · KVM
iii engine
N vCPUs, pinned
cgroup cap M, no swap
⇄ loopback
Load generator
6 vCPUs, 2 GiB
SDK workers and callers
- Machine sizes
- Each size is a microVM (libkrun on KVM, the virtualization iii's own sandboxes use). The engine runs pinned to its N virtual CPUs, in a cgroup capped at M with no swap: past it, the kernel stops it, and the run says where. The load generator runs in the same VM on 6 vCPUs and 2 GiB of its own and talks to the engine over the VM's loopback, so it never takes the engine's CPU and nothing proxies their sockets.
- The host
- The same engine as a plain process, pinned to half of the machine’s cores and not capped: the reference without a VM.
- The load
- Real SDK workers (the Rust SDK) call, host, observe and report observed calls, as an application would. Idle workers are raw WebSockets, so ten thousand fit in one process.
- A step
- 10 seconds of load after a warm-up, with the engine’s CPU, memory and threads read from /proc every 250 ms. Every scenario starts on a fresh engine.
- The engine
- As it ships: default configuration, every span recorded, logs at info. It is the Linux glibc build, the one in the Docker image.
- What it is not
- A shared CI machine, so runs differ by several percent: compare lines within a run, and runs by their trend. The numbers are for this machine; a faster CPU moves every line.
Run it yourself
x86_64 Linux with KVM, in the workers repo next to sandbox-libkrun, against an engine built from iii. The report lands in target/loadtest/.
cd sandbox-libkrun && BUILD_TARGET=x86_64-unknown-linux-gnu scripts/build-init.sh cargo build --release -p iii-loadtest target/release/iii-loadtest suite --engine <iii>/target/release/iii --profiles 2x1024 \ --init target/x86_64-unknown-linux-musl/release/iii-init --krunfw firmware/libkrunfw-linux-x86_64.so