MadWeightsOpen weights research. The Raw Uncut.
RESEARCH ·

Strata on three V100s: where the time goes

On a 2018 dual-Xeon server with three Tesla V100s, a 111 GB mixture-of-experts model generates 50 to 110 tokens per second. The largest avoidable loss was not in the GPUs. It was a 28.8 GB lookup table read from consumer SATA SSDs, where each pool flush froze generation for up to 0.4 seconds at a time.

MODEL
Qwen3.8-Flash-Next
PARAMETERS
177B
QUANTIZATION
UD-Q4_K_XL · 5.0 bpw
FILE SIZE
111 GB
HARDWARE
3 × Tesla V100 32 GB
ENGINE
Strata 0.1.57
0.4 s
Longest single freeze while the disks took a flush
47 of 49
Slow read bursts that fell inside a flush
72%
Fall in mean waiting once a late read is issued a second time

The machine and the model

The server has enough GPU memory to keep 94% of the model's experts on the cards, and not enough system memory to hold its lookup table. That second fact shapes most of what follows.

PartWhat it is
CPUs2 × Xeon Gold 6132, 28 cores in total
Memory80 GB DDR4-2666, with three of six channels per CPU populated
GPUs3 × Tesla V100 32 GB (compute capability 7.0), PCIe 3.0, capped at 200 W each
StorageTwo consumer 1 TB SATA SSDs in a ZFS mirror, behind a RAID controller in pass-through mode, so TRIM never reaches them
HostProxmox, with four small guests writing to the same pool
EngineStrata, source build (engine 0.1.57), CUDA 12.9, the layers split across the three cards

The model is Qwen3.8-Flash-Next in Unsloth's Q4_K_XL quantization: 111 GB in 1,224 tensors. It has 48 blocks with a hidden size of 2,560 and four parallel residual streams. Every fourth block uses sparse attention; the other 36 are recurrent state-space layers. Each block routes a token to 10 of 512 experts.

Part of the modelSizeWhere it lives at run time
Experts: 48 layers × 512, at 4 and 5 bits77.0 GB94% in GPU memory, the rest in system memory
N-gram lookup table, used by layer 1 only28.8 GBOn disk; 16 rows of 90 bytes are fetched per token
Attention, state-space layers, mixers, embeddings and head, at 8 bits5.5 GBGPU memory
Draft layer, a separate small pack with 2-bit experts0.8 GBGPU memory

The lookup table has 320 million rows, keyed by hashes of each token's bigram and trigram. The hashing spreads rows evenly, so there is no small hot subset to cache: a row cache four times larger saved only about 17% of the reads on new text.

What the workload looks like

By total waiting time, generation is 79% and prompt reading is 21%, even though the median reply is only 25 tokens. The numbers come from the server's own log of 1,539 agent requests over three sessions.

  • Prompts are long and mostly cached. The median prompt is 26,000 tokens and the 90th percentile is 52,000. In 88% of turns the engine reuses a cached prefix covering 98.6% of the prompt.
  • Fresh text per turn is small. 28% of turns add 64 tokens or fewer, 26% add 65 to 512, and 32% add 513 to 2,048.
  • A few long replies carry the load. Replies over 1,000 tokens produce 88% of all generated tokens; the longest ran to 22,000 to 30,000 tokens.
  • Cache misses are costly. 17% of agent turns did not reuse the cache and paid a full re-read, about 12% of total waiting.

Generation slows as context grows, and the cause is draft yield, not step time. The time per step is flat across context sizes, with a median of 33.6 ms and a 90th percentile of 44.9 ms.

ContextTokens per secondDrafts accepted
4k to 16k76.178%
16k to 32k70.073%
32k to 48k61.965%
48k to 70k61.065%

So two things decide how fast this box feels for agent work: how many tokens each step yields, and whether a step is ever held up.

Measuring on a noisy box

Tokens per second is too noisy on this machine to compare settings. Two identical baseline runs differed by up to 10% on the same prompts, and repeats within one run varied by 15 to 20%.

Two measures replaced it:

  • Tokens per step. Generated tokens divided by verify steps (generated minus accepted drafts). This is the draft yield, and a stall cannot change it.
  • Time per step, by part. With STRATA_SPLIT_TIMING=1 the engine logs, per verify window, the wait for each GPU stage and the host time in the first stage, which is where the table rows are fetched. The log lines are cumulative, so each request is the difference between two of them.

Each setting ran as its own engine start with the same test battery, and a baseline ran first and last. A model load takes seven minutes, so one campaign of ten to thirteen settings takes two to three and a half hours.

This method withdrew two results that tokens per second had seemed to show:

  • Smaller prompt buffers looked 1.5 s faster over eight turns. The closing baseline reproduced the same gain with no change.
  • Coupled draft sampling looked 8 to 13% faster. Its yield per step was 2 to 3% lower than the baselines; the speed came from a quiet spell on the disk.

Output text is not a usable check either: even greedy replies differ between identical runs. Comparisons of numerical paths therefore use the first token's top-20 log-probabilities. Two identical configurations disagree by a mean KL of 0.005 and pick the same top token in 43 of 45 prompts, which is the noise floor for everything below.

Where a generation step goes

A step costs about 35 ms: 22 to 25 ms of GPU work, 5 to 6 ms of drafting, and 3 to 9 ms waiting for table rows from disk. Each step verifies one token plus the draft layer's guesses for the next few, so speed is tokens per step divided by time per step.

Per stepShort context30k context, reasoning on
Tokens produced2.661.74
GPU work, three stages25.2 ms21.6 ms
Table reads from disk2.9 ms9.2 ms
Drafting and the rest6.4 ms5.1 ms
Total34.5 ms35.8 ms
Tokens per second77.148.5
Tokens per second without the table reads84.265.2
Table reads are the only part that swings
SHORT CONTEXT · 34.5 MS A STEP
GPU work25.2 ms
Drafting and the rest6.4 ms
30K CONTEXT, REASONING ON · 35.8 MS A STEP
GPU work21.6 ms
Drafting and the rest5.1 ms
UD-Q4_K_XL · 5.0 bpw · 111 GB · 3 × Tesla V100 · Strata 0.1.57. Time per verify step by part, from the table above. Baseline run, same engine and settings in both panels. Both panels share one scale: 26 ms is the full bar.

Three things stand out:

  • The GPU share is steady. Each of the three cards takes 7 to 8.5 ms for its 16 layers, whatever the context length.
  • Long context is slow because drafts fail more often. At 30k tokens with reasoning on, a step yields 1.74 tokens against 2.66 at short context.
  • Table reads are the only part that swings. They averaged 2.9 ms in one test and 9.2 ms in the next, on the same engine and settings. The closing baseline, identical again, measured 0.3 ms and 2.7 ms.

"Drafting and the rest" is mostly the draft layer: a regression of step time on drafts per step gives about 2.6 ms per draft. These figures are from the baseline run, before any of the changes below.

The stall

Every stall traced to one cause: during a pool flush, one of the two mirrored SSDs stops answering reads for up to 0.4 s at a time, and the engine's table reader waits for it.

During a flush, the slowest read of a burst takes 164 ms at the median
SLOWEST READ OF A BURST, MEDIAN
Between flushes1.2 ms
SLOWEST READ OF A BURST, 99TH PERCENTILE
Between flushes1.7 ms
UD-Q4_K_XL · 5.0 bpw · 111 GB · 3 × Tesla V100 · Strata 0.1.57. Figures from the disk probe, in the table below: 35 parallel 4 KiB direct reads every 250 ms, timed against the pool's flush log. 420 ms is the full bar.

Writes and reads meet on the same two disks. When one disk pauses to take a flush, the reads sent to it hold the whole step.

The engine is waiting, not computing. Across 79 replies logged alongside disk, GPU and CPU samplers, step time rose with the pool's read latency (rank correlation +0.65) while the engine's CPU core went idle (−0.65). GPU clocks never throttled.

The waits sit inside flushes. A probe issued 35 parallel 4 KiB direct reads of random table rows every 250 ms, the pattern of one generation step, and timed each burst against the pool's flush log. Of 49 slow bursts, 47 fell inside a flush.

Slowest read of a burst, median99th percentileBursts over 10 ms
Between flushes1.2 ms1.7 ms0.4%
During a flush164 ms409 ms69%

The flushes are slow because the SSDs have no clean blocks. The controller in front of them does not pass TRIM. Right after a secure erase they sustained 100 to 170 MB/s; five days later a flush wrote at 5 to 8 MB/s. One SSD at a time enters a slow phase of about 85 seconds, and over two hours the pool spent 39% of the time in one.

The write load is mostly overhead. The guests write about 0.24 MB/s. The pool writes 2 MB/s, about 170 GB a day, because every 5-second flush rewrites its chain of metadata.

Three properties of the reader turn one slow disk into a stalled step:

  • The mirror sends about half of the 35 reads to each disk, so a step always has reads on the slow one.
  • The reads cannot be issued early. Row keys depend on the drafted tokens, which exist only once the previous step ends. With a 6 ms delay injected into every read, each step waited 5.8 ms for its rows, so read latency is paid almost in full.
  • The step needs every row before it can go on. One read still out holds the other 34, and the stock reader never asks the second disk for the same row.

Three fixes, cheapest first

Three changes attack the stall at different points: flush less often, stop waiting on the slow disk, or take the table off the disk.

1. Flush every 30 seconds instead of 5

Raising ZFS's zfs_txg_timeout from 5 to 30 halved the write volume and cut the time spent in slow-write phases from 39% to 10%. It is one runtime setting and reverts instantly. The cost is that a power failure can lose up to 30 seconds of unsynced writes instead of 5.

Flush every 5 s (116 min)Flush every 30 s (32 min)
Physical write volume1.96 MB/s0.98 MB/s
Time in slow-write phases39%10%
Length of one slow flush1 to 3.6 s6 to 10 s

The trade is fewer stalls for longer ones. During a slow phase there is now one pause of up to 10 seconds every 30 seconds, which is why the second fix still matters.

2. Reissue a read that has not come back

A read still out after 3 ms is issued a second time, and the rows are taken from whichever copy returns first. ZFS sends each read to the mirror side with fewer reads in flight, so the copy usually lands on the healthy disk.

In a four-minute probe of 942 bursts, the wait during a flush fell from a median of 152 ms to 3.8 ms, and total waiting fell from 29.4 s to 8.6 s.

The change is about 150 lines in the engine's table reader, off by default behind an environment switch. Its unit test holds every first read for 40 ms and checks that the request still completes in under 6 ms.

The patched reader was then run against the plain one for 20 minutes on the real table. Both fetched the same 35 rows at the same instant, 4,764 times, while the benchmark campaign ran on the same disks.

Plain readerReissuing reader
Median wait per request3.2 ms3.3 ms
90th percentile22 ms6 ms
99th percentile321 ms62 ms
Requests over 100 ms12818
Total waiting71.2 s26.0 s

Every row matched between the two readers. The reissuing reader sent 12% of its reads twice, and the copy came back first for 40% of those.

The reader was then run inside the engine while it generated text. To give both modes the same disk conditions, it switched reissuing on and off every 7 seconds through an 11-minute test battery and counted the two kinds of request apart.

Plain periodsReissuing periods
Requests12,85914,333
Mean wait per request2.01 ms0.56 ms
Requests over 10 ms10613
Requests over 100 ms335
Longest wait3.6 s2.7 s

Mean waiting fell by 72%, about 1.4 ms of a 33 ms step, and GPU and drafting time per step did not change. Two limits showed up:

  • The reader needs more threads. The result above used 64. In a second run with the default 16, the mean fell by only 14%, and 38% of copies came back first against 74%, which fits copies queuing behind the blocked originals.
  • A few long pauses remain. Waits of two to three seconds occurred in both modes, so a second copy does not get around them.

The reissuing reader now runs in production here with 64 reader threads, as a stopgap until the table moves to memory. The fix depends on the mirror: hardware RAID 1 hides the two copies from the file system, and striping has only one.

3. Take the table off the disk

With the table in memory (--ple-io ram), generation never touches storage. That needs about 97 GiB in total on this box, against 77 GiB installed, so it waits on a memory upgrade. Strata's release notes report prompt reading 16 to 30% faster from this setting on other hardware. A separate drive that takes no writes would remove the stalls too.

A faster prompt path

Reading fresh prompt text spent about half its GPU time unpacking 4-bit experts to 16-bit before multiplying. A kernel that multiplies on the 4-bit weights directly cut the wait before a reply starts by 35 to 50% for additions of 90 to 600 tokens.

Any addition over 64 tokens takes the engine's batched path, which cost about 1.1 seconds before it read anything: three GPU stages of roughly 0.4 s each. Inside a stage, 48% of the time went to unpacking experts, 35% to the two matrix multiplies and 8% to grouping on the host.

Strata ships a second set of prompt kernels, taken from llama.cpp, that work on the quantized weights with 8-bit activations. They are on by default only for newer cards, and STRATA_MMQ_KQ=1 turns them on for the V100.

The saving is a fixed amount, so it matters most for the small additions that make up most agent turns. The token-by-token path, which the engine uses for 64 tokens or fewer, costs about 7 ms per token and loses to the new kernel at every size tested.

Cold reads gained less: 659 to 783 tokens per second at 7.5k tokens, and 1,529 to 1,687 at 39k. Generation speed did not change.

Does it read as accurately?

The kernel rounds differently, so its output was compared with the engine's slow token-by-token path as the reference. It is slightly further from the reference than the 16-bit path on short prompts, and no worse on long ones.

Test16-bit pathDirect 4-bit kernel
45 short prompts: same first token as the reference45 of 4543 to 44 of 45
45 short prompts: mean KL from the reference0.0240.040 to 0.046
45 short prompts: median KL from the reference0.0080.009 to 0.013
5 cold reads of 7k to 21k tokens: mean KL0.0560.031
Retrieval of 20 planted codes at 8k, 16k and 29k tokens20, 20, 1820, 20, 18

The retrieval test plants two similar codes for each of ten units in a document, then asks for each one. All three paths, the reference included, missed the same two codes at 29k tokens, so those misses belong to the model.

Strata's own notes report a larger gap on one measure: after a 16K prompt, the continuation matched llama.cpp on 92.2% of tokens with this kernel against 97.7% for the 16-bit path. On this evidence the kernel is now on in production here.

What did not help

Fourteen changes measured as no gain, and two of them had first looked like wins.

ChangeResult
Read small additions token by token (--short-read 256 and 512)Slower. That path costs about 7 ms per token, so it loses to the 16-bit path above 180 tokens and to the 4-bit kernel everywhere above 64.
Custom expert placementNothing to gain. The expert cache already hit 99.9% of 1.36 billion lookups, with no link to reply speed.
Row cache four to eight times largerAbout 17% fewer reads on new text, because the rows are hash-spread.
All conversation state in GPU memory (--kv-resident 0)No gain.
Pipelined verify windowsNo gain; the feature targets two-card splits.
Faster state-space layer kernels (two flags)No gain.
Stricter draft confidence (0.7 instead of 0.5)No gain; 0.3 and 0.4 were worse.
Tensor-core prompt kernel flagNo change at all in timing or output.
Coupled draft samplingNo gain in yield per step. Withdrawn after first appearing 8 to 13% faster.
Smaller prompt buffersNo gain. Withdrawn after the closing baseline matched it.
Longer draft window (5 or 6 tokens instead of 4)No net gain. At 5, tokens per step rose 9% and so did GPU time per step. At 6, speed fell 3%.
Chained lookup drafts, two deepNo gain.
Streamed normalisation in the draft layerNo effect at short context; unproven at long context.
Twelve faster-kernel flags togetherNo net gain. GPU time per step fell 3% and tokens per step fell 2 to 3%, in two campaigns.

Still open

The largest open question is how to measure draft yield at long context, the size most of this workload runs at.

  • Draft yield at long context. At 30k tokens, tokens per step followed the length and content of the reply more than any setting. Two identical baselines gave 1.65 and 1.72, and two runs that changed only the table reader, which cannot affect drafting, gave 1.71 and 1.86. Every long-context comparison of draft settings is therefore unproven. The next test replays a fixed text, so each setting drafts against the same tokens.
  • An English-only draft vocabulary. Drafting cost 0.6 ms less per step in two campaigns, about 1.5%, with tokens per step unchanged at short context. Its effect at long context waits on the test above.
  • A subset of the faster kernels. Twelve kernel flags lowered GPU time as a set and lowered tokens per step as a set. Testing them one at a time could find a subset that keeps the first and not the second.
  • Draft-layer precision. The draft layer's experts are stored at 2 bits. Whether a 4-bit pack would raise acceptance enough to pay for its extra time and memory is untested.
  • The table in memory. Once the memory upgrade is in, the reads leave the step and the third fix can be measured.

Method and versions

Everything here was measured on one machine, with one model in one quantization, through the server's normal API.

  • Test battery. Six single-request cases (code, JSON and a file edit decoded greedily; prose, a reasoning problem and an agent turn with tools, sampled), plus two and four requests at once.
  • Agent-shaped tests. One conversation with a cached prefix of 8k, 30k or 40k tokens, and turns that add a set number of fresh tokens. Prompt text comes from the engine's own documentation and source, about 819,000 tokens, so nothing was downloaded.
  • Campaign runner. One engine start per setting from a copy of the production configuration, the same battery on each, and a baseline first and last. Requests from other clients during a test are detected and flagged.
  • Disk probes. Read-only bursts of 35 direct reads against the table file, timed with the pool's own flush log.
  • Versions. Strata source build with engine 0.1.57, CUDA 12.9, ZFS 2.4.4, Linux 7.0 under Proxmox.

The limits are worth stating. The short-prompt accuracy check is 45 prompts, the long-read check is 5 and the retrieval check is 60 questions per path. The two flush-interval periods are of different lengths and times of day. The reissued-read result inside the engine is one 11-minute run per thread setting.