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.13.0: a standard GitHub runner, 4 cores. Lower is faster; each line is a benchmark’s history, and its last point is v0.26.0, measured Nov 9, 2026.
WebSocket round trip
One call from a worker, through the engine, to another worker and back, over real sockets.
- invoke_echo108 µs54% slower
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/0988 nsnew
- default/13.9 µsnew
- default/822 µsnew
- default/64132 µsnew
- filtered/164 µs±6%
- filtered/2564 µs66% faster
- filtered/10244 µs92% faster
- filtered/40004.1 µsnew
Concurrent calls
N calls at once to a function hosted in the engine, waiting for all of them.
- 11.5 µs10% slower
- 811 µs±6%
- 3255 µs12% slower
- 128221 µs13% slower
Payload size
One call carrying 1 KB to 1 MB of JSON.
- 1kb1.1 µs±2%
- 10kb1.5 µs±3%
- 100kb5.7 µs20% slower
- 1mb69 µs50% slower
Registration churn
Registering and removing functions, workers and observers by the hundred and the thousand.
- functions_register_remove/10049 µs23% slower
- functions_register_remove/1000545 µs34% slower
- functions_register_remove/50002.7 ms26% slower
- observers_add_remove/100264 µsnew
- observers_add_remove/10002.3 msnew
- observers_add_remove/500011 msnew
- workers_register_unregister/100147 µs±5%
- workers_register_unregister/10001.7 ms73% faster
- workers_register_unregister/500026 ms36% faster
Channel relay2 benchmarks
- large_frame823 µsnew
- small_frame50 µsnew
Core runtime1 benchmark
Calling a handler registered in the engine.
- engine_call_registered_handler1.4 µs±3%
Key-value contention4 benchmarks
N writers on the same key at once.
- 1361 ns31% slower
- 41.4 µs23% slower
- 165.2 µs19% slower
- 6426 µs19% slower
Key-value store10 benchmarks
Reads, writes, updates and listings in the built-in store.
- delete591 ns23% slower
- get_hit231 ns23% slower
- get_miss98 ns23% slower
- list_100_items29 µs22% slower
- list_groups183 ns38% slower
- list_keys_with_prefix273 ns24% slower
- set_overwrite443 ns23% slower
- update_increment360 ns15% slower
- update_merge811 ns19% slower
- update_set_field423 ns23% slower
Metrics accumulator2 benchmarks
- existing_function30 ns50% slower
- first_invocations14 µs17% slower
Observe activation ws18 benchmarks
- envelope/4KiB/1662 µsnew
- envelope/4KiB/163.3 msnew
- envelope/4KiB/6412 msnew
- envelope/64KiB/18.1 msnew
- envelope/64KiB/1630 msnew
- envelope/64KiB/64112 msnew
- envelope/256B/1202 µsnew
- envelope/256B/161.3 msnew
- envelope/256B/645.1 msnew
- input/4KiB/1521 µsnew
- input/4KiB/162.2 msnew
- input/4KiB/647.7 msnew
- input/64KiB/17.1 msnew
- input/64KiB/1617 msnew
- input/64KiB/6459 msnew
- input/256B/1159 µsnew
- input/256B/161 msnew
- input/256B/643.9 msnew
Observe fanout4 benchmarks
- 130 µsnew
- 846 µsnew
- 3278 µsnew
- 128207 µsnew
Observe route lookup4 benchmarks
- hit/163 nsnew
- hit/1000063 nsnew
- miss/122 nsnew
- miss/1000049 nsnew
Observe routed15 benchmarks
- filtered/16107 µsnew
- filtered/256113 µsnew
- filtered/1024112 µsnew
- filtered/4000113 µsnew
- matched/1106 µsnew
- matched/8118 µsnew
- matched/64202 µsnew
- metadata_4k/1134 µsnew
- metadata_4k/8156 µsnew
- metadata_60b/1107 µsnew
- metadata_60b/8120 µsnew
- observed/099 µsnew
- observed/198 µsnew
- observed/8115 µsnew
- observed/64186 µsnew
Protocol: decode7 benchmarks
Parsing each wire message from JSON.
- InvocationResult1.2 µs19% slower
- InvocationResult_Error548 ns18% slower
- InvokeFunction1.1 µs20% slower
- Ping98 ns±5%
- Pong98 ns±5%
- RegisterFunction514 ns20% slower
- WorkerRegistered273 ns11% slower
Protocol: round trip7 benchmarks
Encoding and decoding each wire message.
- InvocationResult1.6 µs21% slower
- InvocationResult_Error801 ns21% slower
- InvokeFunction1.5 µs20% slower
- Ping109 ns±4%
- Pong110 ns±4%
- RegisterFunction650 ns21% slower
- WorkerRegistered414 ns±6%
Protocol: encode7 benchmarks
Turning each wire message into JSON.
- InvocationResult401 ns26% slower
- InvocationResult_Error236 ns22% slower
- InvokeFunction397 ns21% slower
- Ping25 ns25% slower
- Pong25 ns19% slower
- RegisterFunction117 ns18% slower
- WorkerRegistered150 ns11% slower
Pub/sub fan-out4 benchmarks
One message to N subscribers.
- 129 µs30% slower
- 849 µs31% slower
- 32107 µs14% slower
- 128373 µs±4%
Worker cleanup9 benchmarks
Tearing down a worker that leaves with its functions and calls in flight.
- functions/103.6 µs56% faster
- functions/5015 µs11% faster
- functions/20055 µs±2%
- invocations/101.1 µs60% faster
- invocations/502 µs52% faster
- invocations/2005.4 µs28% faster
- observers/107.5 µsnew
- observers/5014 µsnew
- observers/20038 µsnew
Invocation tracking, concurrent4 benchmarks
The same with N calls at once.
- 1263 ns29% slower
- 81.7 µs24% slower
- 3211 µs15% slower
- 12847 µs11% slower
Invocation tracking2 benchmarks
Recording which worker each call belongs to.
- add_remove_sequential181 ns30% slower
- add_with_200_existing184 ns32% slower
Ws roundtrip payload sizes3 benchmarks
- 1kb121 µs67% slower
- 10kb145 µs56% slower
- 100kb518 µs30% slower
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