Skip to content

Effect of parallel users in decode speed for Basalt

Every benchmark chart in this space has the same upward slope: more concurrent users, more aggregate tokens per second. The math behind it is real — a decode step pays for the weight pass once and every sequence in the batch rides along, so a batch of four roughly quadruples throughput if the weights dominate the step. Basalt's config docs advertise a parallel setting that supports 1..8 slots, and my last Basalt post left that knob at its default because I'd never had a reason to touch it. This week I gave it a reason: four simultaneous 64k-token conversations, measured on both packs, ladder all the way up. The aggregate curve runs backwards on this box, and the reason is worth more than the numbers.

The box and the ground rules

GPU RTX 5090 (32 GB)
CPU Ryzen 7 9800X3D
RAM 128 GB DDR5
Engine Basalt 0.6.0, kv int8, 262k context, vram-elastic on
Packs official Qwen3.8-FN-UD-IQ4_XS (97.6 GB) and UD-IQ3_XXS (87.6 GB)

Same rules as the previous posts: engine-direct, temperature 0, reasoning off, the engine's own reported timings, raw JSONL ledgers kept. The one new shape: each parallel level boots a fresh engine with parallel set to N, then I fire N distinct cold prompts at it. Each prompt is a re-salted ~64k-token filler (measured prompt_n ≈ 63,800, cache_n = 0 on every cold row) plus a long-form question, decode window 192 tokens. Streams are spawned 0.35 s apart — negligible against the spans, but enough that slot 0 started before the rest arrived, so slot 0's numbers should be read with a grain of salt.

What parallel = N actually buys you

Before any request hits the engine, the slot count already costs something. Basalt funds each KV slot out of the VRAM that was holding the expert cache:

parallel KV line at load expert cache in VRAM (placed cuda0) host tier
1 kv 3.9GiB cuda0 solo=262144 25.1 GiB 36.0 GiB
2 kv 7.7GiB cuda0 slots=2x262144 20.8 GiB 40.3 GiB
3 kv 11.4GiB cuda0 slots=3x262144 17.1 GiB 44.0 GiB
4 kv 15.1GiB cuda0 slots=4x262144 13.4 GiB 47.7 GiB

Identical pattern on both packs. Every slot beyond the first trades 3.7 GiB of on-GPU expert cache for 3.8 GiB of 262k-token KV headroom. On a resident model that trade would be free — the KV pool comes from VRAM nobody is using. On an expert-streaming MoE the VRAM is not spare, it's the hot tier, and the engine just pre-charged every request for slots it hasn't used yet.

The docs I have don't match the engine I run

Basalt's running.md (my checkout is tagged v0.3.2, the engine runs 0.6.0) says --max-context is shared across slots — --parallel 4 --max-context 262144 should give four slots of 65,536 tokens, with full context per slot as the opt-in (--slot-full-context). My 0.6.0 engine printed the opposite: kv ... slots=4x262144 and a pool that scaled 3.9 → 15.1 GiB with N, i.e. every slot got the whole context and the KV bill quadrupled. Whether 0.6.0 flipped the default or the config-file route reads the flag differently, I don't know — the load line is what I measured, so that's what this post prices. If your slots cost context/N instead, the numbers here are a pessimistic bound on capacity and an unchanged statement about the expert-cache carve, which scales with slots either way.

The tax on a solo user

The engine restarted, warmed with a throwaway prompt, then ran a solo cold 64k prompt and three long-form follow-ups in the same conversation — nothing else sharing, no other traffic on the box (I checked the engine log afterwards: the measurement windows are clean).

pack parallel cold prefill cold decode warm FU decode (median [min–max]) Source
IQ4_XS 1 7074 ms · 9016 t/s 218.5 t/s 249.5 [233–268] measured, engine-direct, solo
IQ4_XS 2 7031 ms · 9071 t/s 177.0 t/s 200.3 [195–204] measured, engine-direct, solo
IQ4_XS 3 7082 ms · 9005 t/s 144.9 t/s 163.3 [151–173] measured, engine-direct, solo
IQ4_XS 4 8255 ms · 7725 t/s 115.4 t/s 126.0 [121–126] measured, engine-direct, solo
IQ3_XXS 1 6785 ms · 9400 t/s 287.6 t/s 304.9 [293–327] measured, engine-direct, solo
IQ3_XXS 2 6779 ms · 9408 t/s 231.8 t/s 262.9 [256–273] measured, engine-direct, solo
IQ3_XXS 3 6939 ms · 9190 t/s 198.7 t/s 205.6 [78–239]† measured, engine-direct, solo
IQ3_XXS 4 7036 ms · 9068 t/s 158.7 t/s 163.6 [161–172] measured, engine-direct, solo

† one IQ3/p3 follow-up answered in 11 tokens and its 78 t/s is a short-window artifact; the other two rows are 238.7 and 205.6.

Prefill barely notices the slots — it's weight-streaming-bound and one user is already saturating the lane. Decode notices immediately: −20% at two slots, −34% at three, −49% at four, on IQ4, and the same shape on IQ3. That is the expert-cache carve, or at least it's the leading suspect: it's the only thing that changed at load time, and the cost curve tracks it. What I can't show is the per-token path — the engine's own per-request lines refuse to move with it. Averaged over the 192-token rows in each boot window, expert-cache hit stayed flat (IQ4: 64.4% at p1 vs 64.7% at p4; IQ3: 76.3% vs 68.3%) and the pcie= share read 0.0% in every window. So the mechanism between "3.7 GiB less hot tier per slot" and "half the step rate" isn't visible in the log — attributing the slowdown to cache thrashing is speculation, well-supported speculation, but speculation. Draft acceptance was flat across the ladder (62–82% everywhere), which does rule out speculation quality as the mover: the step rate itself slowed.

For reference, the same session on the same box shows the packs' solo ordering holding at every level: IQ3_XXS is 15–22% faster to decode than IQ4_XS, which is what fourteen fewer gigabytes of streamed weights buys.

Four users, four slots: the aggregate that isn't

Each level's home game — N concurrent cold 64k prompts, one per slot:

pack parallel per-stream prefill t/s per-stream decode t/s span, all N done aggregate new-tok/s Source
IQ4_XS 1, K=1 8936 236.2 8.0 s 8036 measured, engine-direct, 1 concurrent
IQ4_XS 2, K=2 8993*, 4565 88.5*, 190.5 22.2 s 5771 measured, engine-direct, 2 concurrent
IQ4_XS 3, K=3 8869*, 4196, 4200 75.0, 74.7, 162.2 38.9 s 4933 measured, engine-direct, 3 concurrent
IQ4_XS 4, K=4 7669*, 4127, 4150, 4171 61.0, 64.2, 66.1, 129.1 56.1 s 4562 measured, engine-direct, 4 concurrent
IQ3_XXS 1, K=1 9308 324.0 7.5 s 8586 measured, engine-direct, 1 concurrent
IQ3_XXS 2, K=2 9312*, 5144 110.6*, 247.1 20.1 s 6365 measured, engine-direct, 2 concurrent
IQ3_XXS 3, K=3 9043*, 4761, 4724 85.1, 94.7, 199.0 35.0 s 5481 measured, engine-direct, 3 concurrent
IQ3_XXS 4, K=4 9010*, 4280, 4402, 4321 71.3, 87.3, 69.8, 155.7 52.6 s 4867 measured, engine-direct, 4 concurrent

* slot 0's head start (0.35 s spawn stagger) — it prefills near solo speed before the lane gets crowded; treat it as the solo number, not a batching win. Aggregate is (prompt + completion − cached tokens) ÷ span across all streams.

Four users on IQ4 at parallel=4: 4,562 tok/s aggregate. One user at parallel=1 gets 8,036. The batch didn't scale — it fell to 57% of a solo run, and the last user waited 56 seconds to finish a prompt that takes one person 7.3. The per-stream decode rows are a little grim too: at K=4 nobody decodes faster than 129 t/s, and three of the four sit in the 60s. Each stream's step pays for its own 64k KV read, and a batch of four divergent MoE streams leaves little shared work to amortize against it.

The counterfactual that ends the argument

Production runs parallel: 1. What does four concurrent users get there? I left the engine on the golden one-slot config and fired the identical four-stream ladder at it — the engine queues internally:

config per-stream prefill t/s per-stream decode t/s span, all 4 done aggregate new-tok/s Source
IQ4_XS, parallel=1, K=4 queued 8507–8826 206.1–229.1 33.2 s 7705 measured, engine-direct, 4 concurrent

Same four requests, same engine, one slot: every stream prefills at ~8.6k t/s instead of 4.3k, every stream decodes at ~210 instead of 60–130, and all four users finish in 33 seconds instead of 56. Queueing beat every parallel config on every metric, for every one of the four users.

The reason is the difference between splitting a lane and taking turns with it. Four parallel prefills divide the PCIe lane and each pay the shrunken expert cache; a queue hands the whole lane to one prefill at a time — a 64k prompt takes 7.4 s either way, so the fourth user's wait is bounded by other people's prefill, not by a permanent performance tax on every step of their session. The 33.2 s span for four streams is almost exactly four solo spans (~8 s each), so on this build the queued reads were effectively serial, even though the docs promise prompt reading "beside" decoding slots. Serial was still enough: no stream paid a per-slot tax, so none of them ran slower than a solo run.

There's a second quiet win in the queue. I ran a warm-follow-up round after each ladder (the four streams asking follow-ups of the same shared 64k conversation). On the one-slot engine all four streams resumed with cache_n = 63,931 — everyone rides the same resident prefix. On parallel=4 only slot 0 hit (63,930); the other three re-prefilled the history at ~4.3k t/s, because KV lives in the slot that made it. Prefixes are not shared across batch slots.

Why the published curves go up

The amortization math only survives if three things hold, and one of them is already false on this box:

Assumption Benchmark charts My box
Weights resident in VRAM; one pass serves the batch yes no — experts stream per token, and different users route to different experts, so the "shared" pass scales with heads
Short context, so per-sequence KV reads are noise usually ≤1k tokens 64k tokens of KV re-read per step per stream
Extra slots funded from idle VRAM yes (KV pool grows into empty pool) no — funded by the expert cache, a 3.7 GiB-per-slot tax

When all three hold, batching is free money and the charts are honest. I've seen the flip myself: on the dual-R9700 Radiance box with the same model resident in 128 GiB of HBM, a short-context (~600-token) concurrency ladder scaled like the vendors — 113 → 186 → 270 t/s aggregate at ¼/8 lanes — and the same box's 64k ladder flattened toward the queue's shape (measured, unpublished ledger on that host). Same physics, different ratios. The published scaling numbers are short-context, resident-weights numbers; anyone repeating them as a general property of batching is quoting the regime, not the law.

Read concurrency charts for their regime, not their slope

A "decode tok/s vs concurrency" chart without the context length and the model-residency story on the axis is a marketing slide. At 128 tokens a model that stays in VRAM will look like a different product than the same model at 64k with experts streamed over PCIe.

Caveats and what runs now

Single run per cell, n=3 follow-ups per solo row — solid directional numbers, not tight error bars. The per-stream concurrency rows are not simultaneous samples: a stream's decode window overlaps other streams' prefills, and the slot-0 head start is marked. Everything is the 64k regime; short-context behaviour on this exact box is the open leg I haven't re-run since the R9700 contrast above.

Production stays exactly as it was: parallel: 1, official UD-IQ4_XS pack, queue doing what queueing does. The parallel knob now has a measured price tag on this box — about 20% of your solo decode per slot you'll probably never use — and it's going back in the drawer. The ledgers (bench-conc-1201/) sit beside the engine's data dir with the harness, in case a future release changes what the slots cost.

Comments