Durability costs a model call 24 to 28 ms at p95.
A model call made directly against the same call inside a Temporal workflow, 200 runs per arm on LM Studio and vLLM, compared at p95 and p99, then the same prompt through the whole Continuum platform on LM Studio, span by span.
UPDATED 2026-09-29 · VERSION 0.4
The benchmark
The benchmark runs two tests against the same model call made directly. The first puts a Temporal workflow around the call and nothing else, so what it adds is durability's cost alone. The second sends the same prompt through the whole Continuum platform, which does far more than run the call, and measures what a real request costs. The lead figures come from 200 runs per arm in Nemotron 3 Nano 4B's runtime comparison, the first test on LM Studio and on vLLM and the second on LM Studio, and every run is kept with its setup. They replace the "3.5% at p99" the site quoted for months with no run behind it.
Like for like
Durability's own time is 24 to 28 ms at p95 and 25 to 32 ms at p99, on either runtime.
The first test isolates Temporal. Both arms make the same streamed call, with the same prompt, the same model and the same client pipeline, on one machine. They take turns run by run, so any drift in the model's speed lands on both.
- Client → model. The call made directly, timed from the request to the last token.
- Client → Temporal → model. The same call inside a workflow of one activity, with the answer returned as the workflow's result. Timed from starting the workflow to the result in hand. Nothing of Continuum's is in the path: no Gateway, Postgres, Redis, Relay or fetch.
Table view
| Runtime and prompt | p50 | p95 | p99 | Runs |
|---|---|---|---|---|
| LM Studio, short prompt, 88-token answer | 13 ms | 24 ms | 25 ms | 200 |
| vLLM NVFP4, short prompt, 137-token answer | 13 ms | 24 ms | 25 ms | 200 |
| LM Studio, long prompt, 658-token answer | 14 ms | 26 ms | 30 ms | 200 |
| vLLM NVFP4, long prompt, 700-token answer | 14 ms | 24 ms | 26 ms | 200 |
| LM Studio, 4K document, 358-token answer | 16 ms | 28 ms | 32 ms | 200 |
| vLLM NVFP4, 4K document, 257-token answer | 16 ms | 27 ms | 28 ms | 200 |
| Short prompt | Long prompt | 4K document | |
|---|---|---|---|
| The answer, LM Studio / vLLM | 88 / 137 tokens | 658 / 700 tokens | 358 / 257 tokens |
| LM Studio: the call, p95 | 300 ms | 1,984 ms | 1,130 ms |
| LM Studio: durability's own time, p95 | 24 ms (8.0%) | 26 ms (1.3%) | 28 ms (2.5%) |
| LM Studio: durability's own time, p99 | 25 ms | 30 ms | 32 ms |
| vLLM NVFP4: the call, p95 | 631 ms | 3,205 ms | 1,168 ms |
| vLLM NVFP4: durability's own time, p95 | 24 ms (3.8%) | 24 ms (0.8%) | 27 ms (2.3%) |
| vLLM NVFP4: durability's own time, p99 | 25 ms | 26 ms | 28 ms |
Each arm ran 200 times, on two runtimes and three prompts: LM Studio running the GGUF build on Windows, and vLLM running an NVFP4 build of the same model in WSL2. A percentage is of the direct call's p95 on the same prompt. Durability's time outside the call didn't move with the runtime or the length of the answer: 24 ms at p95 for an 88-token answer, 26 ms for a 658-token one. The 4K document adds 2-4 ms, because the workflow's input carries its 17 KB prompt and Temporal persists it.
The tail is measured outside the model call.
Every run's Temporal history records when the activity started and finished, so the time the client spent outside it is durability's alone: the start, the dispatch to a worker, the result coming back, and the client's call to collect it. The 2 to 4 ms the activity spends around the model call counts with the call, and the model's own spread can't show up in what is left.
At 200 runs the nearest-rank p95 is the 190th value and the p99 the 198th, so no single slow run sets either. Measured this way, durability's p95 is 24 to 28 ms on every runtime and prompt, and its p99 25 to 32: on the long prompt, 26 ms at p95 and 30 at p99 on LM Studio, and 24 and 26 on vLLM. Measured end to end instead, each durable run against the direct calls' fit, the long prompt's p99 is 116 ms on LM Studio and 416 on vLLM, which is the model's own spread: its direct calls alone ranged over 191 ms and 527. One run in 1,200 spent more than 100 ms outside the call, LM Studio's 4K run 126, whose workflow start took 433 ms, which fits the reconnect to Temporal under Full service.
Temporal's time is three hand-offs, whatever the model writes.
| From Temporal's history | p95 | p99 | p50, for context |
|---|---|---|---|
| Workflow started to activity started | 15-17.5 ms | 16-19 ms | 5-6 ms |
| Activity completed to workflow completed | 5-9 ms | 8-17 ms | 4.5-5.5 ms |
Durability's 24 to 28 ms outside the call at p95 is the start, the dispatch, the result coming back, and about a millisecond for the client's call to collect it. The table has the dispatch and the return as Temporal's history records them; the start and the collect are the client's own calls. The dispatch sets most of the tail: Temporal hands the activity over in about 5 ms or about 15, and 23 to 31 runs in 200 take the longer. Inside the activity, starting it and returning its result count with the model call.
A long answer doesn't make any of it bigger, which is why on LM Studio its share falls from 8.0% of an 88-token answer's p95 to 1.3% of a 658-token one's. Eager workflow start would trim the dispatch by about 3 ms, but only for a process that hosts a worker, and a worker has no place in the Gateway.
The first durability runs: 20 and 30 per arm, LM Studio only
Taken the morning of 2026-09-25, before the runtime comparison, with the
inference capability's sampling (temperature 0.7, 4,096 tokens) and
LM Studio at one slot, then four. At 20 or 30 runs a p95 is the second-slowest run and
a p99 the slowest, so these give the slowest run by name, against the direct call's
slowest.
| 80 tokens, 1 slot | 730 tokens, 1 slot | 730 tokens, 4 slots | |
|---|---|---|---|
| Runs | 30 | 20 | 20 |
| Client → model, slowest run | 297 ms | 2,469 ms | 2,526 ms |
| Outside the activity, slowest run | 35 ms (11.7%) | 55 ms (2.2%) | 52 ms (2.0%) |
| Outside the activity, p50, for context | 15 ms | 16 ms | 19 ms |
Full service
Through the whole platform, Continuum's own time is 35 to 43 ms at p95.
The second test sends the same prompt through everything the
durable inference
page describes: the Gateway's auth, session and writes to Postgres and Redis, the
workflow, the answer streamed into Redis as the model writes it, the Relay's notice over
SignalR, and the fetch. It ran on LM Studio, 200 runs per arm, because the platform is
wired to LM Studio, and at the inference capability's own sampling
(temperature 0.7, 4,096 tokens), which is why its answers run 80, 728 and 328 tokens.
| Short prompt, 80-token answer | Long prompt, 728-token answer | 4K document, 328-token answer | |
|---|---|---|---|
| The call, p95 | 308 ms | 2,548 ms | 1,164 ms |
| The platform's own time, p95 | 36 ms (11.6%) | 43 ms (1.7%) | 35 ms (3.0%) |
| The platform's own time, p99 | 40 ms | 344 ms, a reconnect | 38 ms |
The 202 Accepted, p95 | 16 ms | 21 ms | 16 ms |
The platform's own time is each request's time outside the model's activity, as for durability alone, and a percentage is of the direct call's p95. The activity's own Redis work, reading the prompt before the call and writing the end markers after it, sits inside the activity and counts with the call here; the spans below give it its own stretches.
Table view
| Prompt | p50 | p95 | p99 | Runs |
|---|---|---|---|---|
| Short prompt, 80-token answer | 25 ms | 36 ms | 40 ms | 200 |
| Long prompt, 728-token answer | 28 ms | 43 ms | 344 ms | 200 |
| 4K document, 328-token answer | 25 ms | 35 ms | 38 ms | 200 |
The model call dwarfs everything around it.
Every host exports its spans to the Aspire dashboard, and one trace holds the Gateway's handler, the worker's workflow and activities, and the Relay's handler together. The bars below are the traced request at the p95 of its traced time, the 190th of 200, drawn to scale: Continuum is two slivers around the model call, 41.5 ms of 344.8 on the short prompt and 44 of 2,595 on the long one. In both, the dispatch is the stretch that grew, to about 15 ms against 5 at the median. The fetch comes after the trace, on the client's clock, and adds 3 ms at p95 on the short prompt and 6 on the long.
- Gateway9.9 ms
- dispatch14.8 ms
- read input1.5 ms
- model call303 ms
- end markers7.5 ms
- notice6.9 ms
- Relay0.9 ms
Continuum 41.5 ms of 344.8 in the trace. The dispatch is 14.8 of them and the workflow task before the notice 6.9, both Temporal's.
- Gateway12.9 ms
- dispatch15.7 ms
- read input1.6 ms
- model call2,551 ms
- end markers6.1 ms
- notice7.0 ms
- Relay1.0 ms
Continuum 44 ms of 2,595, too thin to point at.
What each stretch is
| Stretch | p95 | p50 | What happens |
|---|---|---|---|
Gateway, to 202 | 14.8 ms | 11.6 ms | Auth and session from the Redis cache; the thread and both messages in Postgres, with the prompt going into Redis alongside; StartWorkflow, 2.8 ms at the median |
| Dispatch | 15.8 ms | 5.0 ms | Temporal's workflow task, with the activity handed over in its response |
| Read input | 1.6 ms | 1.4 ms | Three Redis calls in sequence: check the prompt exists, clear a retry's output, read the prompt |
| The model call | 308.5 ms | 301.4 ms | The same as calling the model directly, whose p95 is 308.0; 2.3 ms of it before the response headers at p95 |
| End markers | 5.9 ms | 5.4 ms | The last chunk and the end markers to Redis |
| Notice | 8.6 ms | 5.9 ms | Temporal: the activity's completion, a workflow task, then the notice as a local activity |
| Relay | 1.0 ms | 0.9 ms | The Relay's handler, then SignalR to the client |
| Fetch | 3.1 ms | 2.7 ms | The output from the Gateway, on the client's clock |
Each stretch at its own p95, from the short run's 200 traces. The p95s don't add up to a request, since no one request is slow everywhere; the bars above are one request.
Against durability alone, the platform adds the Gateway's auth, session and writes
(14.8 ms at p95, with StartWorkflow, durability's own, inside it), the notice
as a Temporal local activity and the Relay (8.6 and 1.0 at p95), and the fetch (3.1). The
wait before the notice is kept on purpose. Moved inside the activity, the notice would go
out sooner but best-effort; as a local activity, Temporal retries it if it fails.
Three levers are still open: the thread and both messages in one statement, the end-of-stream Redis calls in one batch, and a single read before the model call.
The platform's slowest runs are reconnects to Temporal, made slow by the address the hosts used.
Twelve of the 600 platform requests ran more than 100 ms over their median, and every one
was the first Temporal RPC after a reconnect, taking 317 to 447 ms: the Gateway's
StartWorkflow, the worker's dispatch, or the activity's completion. Each of
those traces has a normal model span. They come about every five minutes per connection,
which is when Temporal's dev server closes a client connection at its connection age
(frontend., 5 minutes ± 10%). On the
long prompt they set the p99 outside the activity, 344 ms. The short prompt and the 4K
document held two each, and nearest rank leaves both past the p99.
The 300 ms in each was a misconfiguration: every host reached Temporal at
localhost:7233. The Temporal SDK's gRPC runs in its Rust core, which the .NET
setting under Fine tuning doesn't reach, and for a new connection it tries IPv6 first and
waits 300 ms before IPv4. That fits the 317-335 ms waits; the completions' 417-447 ms fit
less well.
The Lightning runs of 2026-09-26 made their durable calls with Temporal pinned to
127.0.0.1:7233, and the reconnect came in at 113 to 129 ms, every time in the
workflow's start: 6 of their 1,400 durable runs spent 102 to 113 ms starting the workflow,
against a median of 3. All six were on the long prompts, the only runs that lasted past
five minutes. That fits the pin removing the 300 ms IPv6 wait and leaving the reconnect
itself.
Both are settings, and both changed on 29 September: the hosts now reach Temporal at
127.0.0.1, and the dev server keeps a connection for 24 hours. Every run on
this page predates the change.
The first platform runs: 20 and 30 per arm, LM Studio only
| Run | The call, slowest run | Outside the activity, slowest run | Outside the activity, p50, for context |
|---|---|---|---|
| 80 tokens, 1 slot, 30 runs | 321 ms | 38 ms | 26 ms |
| 80 tokens, 4 slots, 20 runs | 309 ms | 35 ms | 27 ms |
| 80 tokens, 4 slots, 30 runs | 310 ms | 35 ms | 25 ms |
| 730 tokens, 1 slot, 20 runs | 2,666 ms | 40 ms | 29 ms |
| 730 tokens, 4 slots, 20 runs | 2,499 ms | 349 ms | 37 ms |
At 20 and 30 runs a p95 is the second-slowest run, so these give the slowest. The last
run's two slowest are two of those reconnects to Temporal, back to back. One more long run
is left out: from its ninth run on, every other direct call waited two seconds for a
new connection, the localhost misconfiguration under Fine tuning.
Fine tuning
Measured one change at a time, the platform's cost at its slowest run fell from 442 ms to 41.
As first built, the platform's slowest request on the short answer took 442 ms longer
than the slowest direct call, and that request's 202 met a 345 ms reconnect
to Temporal. Each change after it was measured on its own before the next one went in. At 20
and 30 runs per arm a p95 is the second-slowest run, so the table compares each run's
slowest request with the direct call's slowest, and a percentage is of the direct call's.
| Change | Added to the short answer, slowest run | What moved |
|---|---|---|
| As first built | 442 ms (163%) | The slowest 202 in 345 ms, a reconnect to Temporal, and 50 ms on every task-queue hand-off |
| Eager activity execution | 155 ms (55.5%) | One hand-off fewer per activity |
| One writer coalescing the reply | 161 ms (57.9%) | The long answer's slowest fetch, from 49 ms to 6: one stream entry per 50 ms instead of one per token |
| The Gateway's writes issued together | 246 ms (89.8%) | The slowest 202, from 52 ms to 46 |
| Temporal's dev server tuned | 41 ms (12.7%) | The 50 ms hand-offs gone: one remote activity from 211 ms to 27 at p95 |
| Four slots and the settings cache fixed, together | 45 ms (14.7%) | One Postgres read fewer per request |
One request sets the Gateway change's row: it spent 230 ms outside the activity, against 110 for the run's median, and its cause wasn't traced.
On the dev server as it ships, every task-queue hand-off costs 50 ms.
Timing trivial workflows, with no Continuum code in them, found why the early runs were slow. The Aspire AppHost now starts Temporal with four settings, each measured on its own, and every run in Like for like and Full service ran on it.
- Eager activity execution
(
system.). The worker receives the activity in the response to the workflow task that scheduled it, one hand-off fewer. It is off by default on the dev server.enableActivityEagerExecution - SQLite in WAL mode (
journal_mode=wal,synchronous=normal). The default journal synced on every commit, 25-50 ms a hand-off. WAL atnormalsurvives a process crash and can lose the last transactions on a power loss, a trade made for a dev server only. - The transfer queue's poll rate
(
history.). The 50 ms was the history service's reader moving new tasks to matching, limited by default to 20 polls a second. At 1,000, one remote activity's p95 fell from 109 ms to 26.transferProcessorMaxPollRPS= 1000 - One task-queue partition
(
matching.andnumTaskqueueReadPartitions …WritePartitions, both 1). With the 50 ms gone, 1 run in 100 waited two seconds on a partition no poller was covering, a misconfiguration: four partitions for one worker. At one, the p99 went from 2,010 ms to 26. One partition suits one worker, and caps a queue's throughput across many.
These settings tune a single-node dev server. A production cluster persists to Postgres or Cassandra and runs partitions for throughput across many workers, so a cluster gets measured on its own.
localhost cost two seconds a connection.
On this machine every store listens on 127.0.0.1 only, and LM Studio on
IPv4 only. A new .NET connection to localhost tries IPv6 first, nothing
answers on ::1, and Windows takes about two seconds to give up and fall
back. The
connection pools hid it, since they pay it only when a connection opens. LM Studio drops
a connection after about four idle seconds, so every model request after a quiet spell
paid two extra seconds, and a Postgres connection opened cold took 4.1 seconds.
It was a misconfiguration, fixed on 25 September: every connection to the stores and
the model now uses 127.0.0.1, and the AppHost sets
DOTNET_SYSTEM_NET_DISABLEIPV6=1 on every project it starts. Temporal's
client connects from the SDK's Rust core, which that setting doesn't reach, so it
dialled localhost until the hosts were given 127.0.0.1 on 29
September (see Full service). That is for the dev stack only: on an IPv6-only network
it would break name resolution, and a deployment configures its own endpoints.
By the book
Every run is taken the same way, and can be repeated from its setup.
- Interleaved. Warmups first, then the two arms alternate, one request in flight on the whole machine, so drift in the model's speed lands on both.
- Equal output. Each run is compared with a direct call of the same length, from a Theil-Sen fit across the direct runs, so one slow run can't move it. At the fixed seed each runtime repeats one answer, so the two arms are compared at identical output.
- Checked before it starts. A preflight confirms the loaded model and its slot count match the configuration, and every answer is checked against the configured model.
- The tail outside the model. Each run's time outside the activity, from its Temporal history, is the tail measure. Every comparison is at the p95 or above: a p95 comes only from 40 runs or more, a p99 from 200, and below that the slowest run is named. A median appears only beside a tail, as context.
- Spans. Every host exports its OpenTelemetry spans to the Aspire dashboard, whose telemetry API returns one trace per request.
| Machine | AMD Ryzen 9 9950X3D (16 cores), 96 GB, RTX 5090 (driver 617.14); Windows 11 Pro, Docker Desktop on WSL2 |
| LM Studio | 0.4.25 (llama.cpp 2.45.0): nvidia-nemotron-3-nano-4b, Unsloth GGUF Q4_K_S, 16,384 context, one slot, flash attention, seed 42 |
| vLLM | 0.29.0 in WSL2: an NVFP4 build of the same model, one sequence, 16,384 context, KV cache bf16, Mamba state f32, seed 42 |
| Sampling | Temperature 0.6, top-p 0.95, top-k 20, min-p 0, repeat penalty 1.0, 8,192 max tokens, thinking on. The platform runs use the inference capability's own: temperature 0.7, 4,096 tokens |
| Temporal | The dev server, Server 1.29.0, pinned by image digest, restarted fresh, with the four settings under Fine tuning |
| Platform | Every host a Release build under the Aspire AppHost, the stores in their containers |
| Prompts | Short: "Count from 1 to 20, separated by spaces. Nothing else." Long: "Explain, in about 500 words, how Redis Streams differ from Redis pub/sub, and when to use each." The 4K document: a fixed 4,089-token text with a two-sentence answer |
| Runs | 200 per arm after 10 warmups, per runtime and prompt |
# the model, as the study loaded it: one slot
dotnet run -c Release --project src/Apps/Continuum.Console -- models up --model nvidia-nemotron-3-nano-4b --parallel 1
# like for like: the call directly, then inside a workflow of one activity
dotnet run -c Release --project src/Apps/Continuum.Console -- benchmark durable-inference --runs 200 --warmup 10 --sampling "temperature=0.6,top_p=0.95,top_k=20,min_p=0,repeat_penalty=1,seed=42,max_output_tokens=8192" --prompt "Explain, in about 500 words, how Redis Streams differ from Redis pub/sub, and when to use each."
# the same against vLLM in WSL2
dotnet run -c Release --project src/Apps/Continuum.Console -- benchmark durable-inference --runs 200 --warmup 10 --sampling "…" --prompt "…" --endpoint http://127.0.0.1:8000 --model nvidia-nemotron-3-nano-4b-unsloth-nvfp4 --runtime vllm
# the whole platform, span by span
dotnet run -c Release --project src/Apps/Continuum.Console -- benchmark inference --runs 200 --warmup 10 --headless
# Temporal's own floor: trivial workflows, no Continuum code
dotnet run -c Release --project src/Apps/Continuum.Console -- benchmark temporal-floor --runs 50A number compares only with one taken on the same machine, model and server settings. Docker Desktop's VM sits between the hosts and the stores here, and a Linux host wouldn't have it. A percentage depends on the answer's length: the same 24 ms at p95 is a smaller share of a slower answer and a larger share of a faster one. The runtime comparison's own setup, including how the NVFP4 build was made, is on the model's page.