mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3321] [Engine] Slot <-> pool copy bandwidth is ~5 GB/s (takes/gave back/park), ~19 GiB conversation costs ~11 s per agent turn; PCIe probe says 26.8 GB/s #1347
Labels
No labels
needs-format
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Niko1221/Strata#1347
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Originally created by @wannagoxuf on GitHub (Oct 20, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3321
Environment
--batch 4 --batch-groups auto --kv k8v4 --kv-resident 524288, conversation cache 384 GiB / 192 slotsObservation
With 5 concurrent conversations on 4 slots, a conversation is evicted back to the pool and re-admitted between turns. The per-turn log of a ~497K-token conversation:
The next turn is the starkest case:
497429 tokens = 497428 reused + 1 read in 7923 ms- 99.9998% cache reuse, a single token actually read, and the turn still costs ~8 s, all of it the gave-back + takes copies.Per turn the conversation pays:
So every agent turn carries a ~11 s pool-shuttle tax that the 99%+ prompt-cache reuse cannot recover (the reuse is prompt-side; the KV itself still shuttles). At 4-5 concurrent conversations slot rotation happens between most turns. A
restored ... in 152.9 msline shows the restore-metadata path itself is fast - the cost is the bulk KV copy.The engine's own PCIe probe at start reports 26.8 GB/s host->device, so the copy runs at ~1/5 of what the bus did in the probe. Plausible causes: a staging buffer that is not pinned, a single copy stream (no overlap of the per-stage/per-layer copies), or device-to-host-to-device hops instead of a direct path.
Suggested directions
Happy to test candidate patches on the 4-GPU box (the 5.3 GB/s number is stable and easy to reproduce: any 5-vs-4-slot rotation with a ~500K-token conversation).
@github-actions[bot] commented on GitHub (Oct 20, 2026):
Thanks for the issue. To keep the tracker readable, every item needs an area prefix in the title and the parts of the issue form filled in. This one is missing:
Edit the issue (title and description) and this note goes away on its own. If it is still missing parts in 5 days it will be closed, which is not a rejection: fix it and comment
/reopen.Details: CONTRIBUTING.md
@wannagoxuf commented on GitHub (Oct 20, 2026):
Root cause found: fresh-page fault + per-page pin, not the bus
The 26.8 GB/s probe and the ~5 GB/s copies were measuring different things. The probe reads a reused pinned arena; the slot/pool copies stage through a
ConversationKvimage whoseConversationBuffersegments (std::vector<uint8_t>, 16 MiB each) were freshly allocated per stage per QSA state and freed right after. On a box running withMALLOC_MMAP_THRESHOLD_=1MiB(our glibc-thrash guard), every 16 MiB segment is a fresh mmap, so the D2H into it pays a 4 KiB page fault plus a per-page driver pin for pages it drops immediately afterwards.Microbench on the same GPU (256 MiB, RTX 4090,
cudaMemcpyAsync+cudaStreamSynchronizeper slice, exactlycopy_nonblocking's shape):MADV_HUGEPAGEThe 2.28 GB/s matches the production park line exactly (602,933 tokens / 7.72 GB snapshot / 3,238 ms = 2.4 GB/s). One correction to this issue's arithmetic: the ~19.5 GiB figure (816 B × 48 layers) over-estimates the payload — the actual snapshot of that conversation is 7.7 GB (
snapshot_bytesin the park line), so the real single-hop rate was ~2.4 GB/s, and the two-hop takes/gave back folded to ~4-5. The 5× gap is not the bus and not pageable-vs-pinned per se — it is cold page tables.Turn-level simulation (5 × 7.72 GB of DMA, layer split 13/13/12/10,
MALLOC_MMAP_THRESHOLD_=1048576): serial fresh 11.44 s → pinned-reuse 1.47 s → pinned-reuse + one-thread-per-GPU 0.40 s.What we changed (local tree, happy to share diffs)
[stage][qsa]pool owned by the batch loop). The warm pages are the point; a buffer that shrank for a shorter conversation grows back into huge-page-advised fresh segments.MADV_HUGEPAGEon new ConversationBuffer segments (the 2 MiB-aligned middle). On THP=madvisehosts glibc's segments never get huge pages on their own. Munmap-return semantics are untouched.retain, so its next park captured the whole K/V into fresh pages every turn while its own superseded copy sat in the pool one erase away. We now move that superseded copy out as the capture's reuse (take_superseded_as_reuse, matching on checkpoint-chain hold OR the entry's live ids being a strict prefix). This was the mechanism behind a nastier symptom: a 520K-token conversation under dense rotation degrading park monotonically 2.3 s → 5.5 s → 30.9 s → 88.5 s as the churn compounded with memory pressure (THPdefrag=madvisedoes not retry a failed synchronous 2 MiB allocation).Production results (332K-token conversation, mixed with live traffic, RTX 4090 ×4)
Huge-page coverage of the pool segments is 99% (231 of 236 GiB). When copies contend with an active prefill they still yield (6.6-8.9 GB/s effective vs 13+ clean) — that is bandwidth sharing, not the fault tax, and it no longer compounds.
@Niko1221 commented on GitHub (Oct 21, 2026):
Your root cause is the best bug report we have had in a while: fresh pages faulted and pinned for every copy, and the microbenchmark shows it clearly. Thank you.
We have not fixed this yet. Your four changes (reusing the K/V shuttle image, one thread per GPU, huge pages on new segments, and taking the superseded copy as the reuse) are what we would do. If you can share the diff or open a PR, we will review and test it, and credit you. #3319 and #3321 have the same text; could you close one of them?
@oscarlius commented on GitHub (Oct 22, 2026):
Additional four-4090 evidence: cache reuse, native copy time, and queue time are distinct
Observed on 2026-10-22 with engine 0.1.46.3, upstream base
9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4(v0.2.1.4), Linux, four RTX 4090 24 GB, Qwen3.8-Flash-Next IQ3_S. Relevant settings: 16 slots / 4 pipeline groups, prefill 2048, context 262144, int8 K/V, resident 24576, conversation cache 98304 MiB / 1024 entries. Local server monitoring/accounting patches are present; these are natural-traffic observations, not a clean upstream A/B.Measurements from our retained logs
Sanitized native lines from our log:
The 4900 copy events span the retained log, not a fixed-duration sample or a controlled trial. We have not measured transfer payload bytes or PCIe bandwidth for these events and do not infer GB/s from token counts.
Among a separate 500-request metrics snapshot, there were 12 normally completed long-context near-full hits (prompt >=65536 tokens, reuse >0, newly read <=64). Their TTFT median was 5.835 s, maximum 38.660 s; native prompt time median was 0.991 s, maximum 2.514 s. These are completed-only, mixed-length/mixed-load samples, not a cache-hit-versus-cold speedup comparison.
One example had prompt 157556 = 157551 reused + 5 read, native prompt time 1046.9 ms, and total TTFT 38.660 s. It confirms reuse, but it does not mean a 38-second K/V copy: most of that interval lies outside the native prompt measurement. Our independently traced 55.314-second wait before native prompt submission belongs to #2275, rather than being charged to this copy path.
Code path and causal boundary
conversation_snapshot_restorerestores the captured K/V extent per stage.conversation_kv_restorevisits and transfers the full saved buffers before refreshing the resident ring. Thus a hit requiring only five new prompt tokens can still incur transfer work proportional to the captured context. Default slot admission additionally uses a temporary host-image save/restore, with a freshConversationKvinside its per-QSA loop.We inspected these paths against
011c9e6(0.2.2); the relevant cache core is unchanged. This is consistent with the allocation/copy mechanism already discussed here. However, we have not independently reproduced the fresh-page-fault/per-page-pin cause on this machine. Those lower-level findings remain the original reporter's evidence; our measurements corroborate nontrivial copy latency but do not establish that all of our latency has the same cause.Deferred/not run: no DMA/page-fault microbenchmark, no candidate engine build, no candidate full-model run, and no before/after speedup claim. Repair work and PR submission remain deferred for service continuity. No model restart or online settings change was made during this investigation; four GPUs, 16 slots, output cap 32768, gateway route timers 600 s, and existing API authentication were preserved. Posting this evidence to the existing thread avoids a competing report or an unvalidated fix claim.
@oscarlius commented on GitHub (Oct 22, 2026):
16-way controlled cache-hit follow-up: sub-second native prompt work, up to 33 s TTFT
Additional measurements from our four-RTX-4090 deployment on 2026-10-22, complementing #2275. Cache reuse was confirmed in every request of two 16-way direct hit replays and a 16-way HTTPS-gateway hit replay, yet waiting before reading remained substantial. The first concurrent wave also reached 331.08 s TTFT; that wave was 15 cold + 1 already warm, not a 16-way all-cold test.
Environment: Qwen3.8-Flash-Next IQ3_S, Linux, four RTX 4090 24 GB; source-built engine 0.1.46.3 / upstream base
9de04cd44e927a9a3df6bbc0e94fc1be8b844ba4(v0.2.1.4), with local Python monitoring/accounting patches disclosed previously. Unchanged: 16 slots / 4 groups, prefill 2048, context 262144, int8 K/V / resident 24576, conversation cache 98304 MiB / 1024 entries, output cap 32768 and gateway route timers 600 s. No restart, configuration change or candidate build/deployment.Controlled hit measurements
Sixteen distinct synthetic histories contained about 130.7K rendered input tokens each. Replays used identical payloads and naturally stopped at about 230 native output tokens; thinking was disabled. Near-full hit means native cache reuse with at most 64 new prompt tokens. TTFT excludes metadata/heartbeat chunks.
For context, the first 16-way wave (15 cold + 1 already warm) had TTFT median 165.41 s, max 331.08 s, native prompt time median 20.41 s, and observed queued-to-reading max 294.57 s. The 15 zero-reuse requests alone had TTFT median 176.28 s.
Terminal sampling limit: telemetry exposes only its trailing 32 events. Hit replay 2 lost one
queuedevent between polls, leaving 15 observed terminal pairs for its phase statistics; all 16 client TTFT/completion records are complete. Its 31.84 s phase maximum is therefore an observed value, not a complete-event-coverage claim.What this establishes, and what it does not
Across all phases (50 direct requests plus this 16-request gateway replay), 66/66 completed with correct six-key retrieval, no timeout/premature EOF, and no client-disconnect-counter increase. Completed-request accounting increased by exactly 66, no other inference arrived during the measured window, no new cache evictions, OOM or swap. Lowest host available memory was about 36.24 GiB and peak GPU temperature 72 C; safety guards did not fire.
The result supports completion of this finite 128K / short-output workload, not low-latency or long-term 16-user acceptance. No 256K/full-output/tool-agent endurance run; no cold-wave HTTPS replay or desktop SDK/UI test. Gateway usage counts differ from native counts, so the table uses native rendered/prompt/cache accounting. No private input, address, path or credential is included. Fixes and PR submission remain deferred; the production service and its authentication were preserved.
@github-actions[bot] commented on GitHub (Oct 22, 2026):
Thanks, this follows the format now.
@wannagoxuf commented on GitHub (Oct 22, 2026):
(Duplicate #3319 closed and
[Engine]added to the title, as asked.)Status: three of the four changes are in #3711; the per-stage concurrent copies are what is left
Niko asked twice for the diff or a PR of the four changes. The page-reuse part is now PR #3711 (by @yoggsaron010-lang, credited to this issue): the reused slot image,
MADV_HUGEPAGEon new segments, and the superseded-park harvest. That leaves the per-stage copies running concurrently, one thread per GPU, which #3711 explicitly leaves out ("It does not add one thread per GPU").What that piece is
The layer split gives each stage its own sessions and buffers, and PCIe x16 is per card, so the per-stage copies aggregate instead of queueing behind each other. The copy body is factored into one per-stage function and the stages run on persistent threads (the calling thread plus one per stage), each syncing only its own device - the same discipline the serial loop had implicitly. All call sites run on the engine's serial orchestration thread, so the shuttle needs no lock.
The turn-level simulation in the first comment of this issue: serial fresh 11.44 s -> pinned-reuse 1.47 s -> pinned-reuse + one thread per GPU 0.40 s.
One difference worth a second look in #3711
#3711 keeps
unchanged_tokensat 0, because "equal token ids do not prove the K/V prefix". Our production variant matches on the entry's live ids being a strict prefix of the outgoing conversation's (same images, same cvec) and setsunchanged_tokensto that depth, so the capture does not re-copy the prefix's K/V. The reasoning behind it is that a K/V prefix is determined by its tokens - a prefix of identical tokens has identical K/V - which is why we treat it as exactly as safe as the checkpoint rule. The two rules fire in different situations: the prefix rule is the one that catches a conversation with no aligned checkpoint chain, which on a multi-turn load was every rotation. It is worth a second opinion, especially because it decides how much of a park is a memcpy and how much is a re-read.Independent corroboration
@oscarlius measured the same copy path on another four-4090 box on 0.1.46.3: slot-copy events p50 677 ms / p95 1386 ms / max 3261 ms, and 16-way hit replays where the native prompt time was 0.885 s median while the client TTFT was 15-19 s median with up to 31.8 s spent queued before reading began. That matches our reading of it: the copy is real, but the queueing in front of it is the larger term.
Happy to open a PR for the per-stage concurrent copies (the piece #3711 leaves out) - say the word and it is up.
@wannagoxuf commented on GitHub (Oct 22, 2026):
Opened the PR for the part #3711 leaves out - the concurrent per-stage copies.
#3742 (draft) -
[Engine] one thread per GPU for the per-stage copies (park capture and slot shuttle)One worker per stage for the three copy paths: the capture into the conversation cache, the slot shuttle's device-to-device path and its round trip through host memory. Measured on a 4x4090 box (Qwen3.8-flash IQ3_XXS, 4-way layer split): the capture of a ~110K-token conversation goes 880 -> 268 ms per 100K tokens (medians, the same binary with
STRATA_STAGE_COPY_PARALLEL=0as the baseline), the slot shuttle's p90 658 -> 73 ms, and the greedy outputs stay byte-identical (5/5).The workers are persistent on purpose: the snapshot copies ride a thread-local private CUDA stream, so a thread per copy would leak a stream per stage per copy.
Kept as a draft because I could not build the HIP and SYCL backends here (no AMD/Intel toolchain) - the change is in the shared
generate.cpp, so a build of those two would be welcome before the review.@yoggsaron010-lang commented on GitHub (Oct 24, 2026):
@wannagoxuf Thanks for raising the prefix rule, and for #3742. I agree the two PRs are complementary.
For #3711 I separated two decisions: reuse the allocation versus trust the existing K/V contents and skip copying them. The current harvest does the former only, using the existing
drop_supersededcheckpoint-chain match andunchanged_tokens=0. Holding the checkpoint establishes that the parked entry is superseded, not by itself that its old payload is byte-identical to the active session.The reason for keeping zero is the existing snapshot API contract at the PR's base:
Identical causal prefixes establish the mathematical dependency, but do not alone establish identical stored bytes across different prompt chunking, prefill/decode paths, or quantization/rounding. I have not demonstrated a mismatch in your production path; this is a contract/provenance concern, not an observed failure or a claim that your approach is incorrect.
Could you share the prefix-harvest diff or explain how the candidate's K/V is tied to the active session and how the earliest rewritten token is tracked through rewind/replay, slot transfers and speculative rollback? An identity check covering independently recomputed prefixes (different chunking and quantized K/V), plus rewinds and partial-page boundaries, would help establish whether the broader skip-copy rule is safe or needs stronger provenance.
Broadening which obsolete entry can donate storage, while still recopying its contents, is a separate possible improvement. I'd prefer not to conflate that with skipping prefix copies until the invariant is established.
I also corrected #3711's validation disclosure: there is a HIP/model slot-path smoke run, but no engine speedup A/B, no real-model superseded-harvest execution, and no CUDA/SYCL or Linux huge-page validation. The reported ctest failures have not been compared against an unchanged base, so I withdrew the claim that all were unrelated.
@wannagoxuf commented on GitHub (Oct 24, 2026):
The prefix-harvest diff you asked for is the
take_superseded_as_reuserule in our localbranch (not in #3742, which is only the per-stage copies). It is small, and I measured the identity question
you raised on our own 4x4090 box rather than leaving it open.
The diff (the harvest rule)
In
ConversationCache(include/strata/core/conversation_cache.hpp), at park time:take_superseded_as_reusepicks the newest parked entry of THIS conversation that qualifies, under two rules:drop_supersededuses): the entry's deepest checkpoint is held by theoutgoing chain. Provenance: that checkpoint was mounted into this session, so its K/V is this session's.
same cvec. Provenance: the entry is this conversation a turn back.
The donated buffers become the capture's
reuse, andconversation_snapshot_savethen callsconversation_kv_save(..., unchanged, ...)withunchanged = reuse.unchanged_tokens, so the firstunchangedcells are NOT recopied - the donated bytes stand in.The bound on the claim: the caller does
conversations.limit_reuse(read_from)withread_from = resume, so the claim is cut at the depth this request actually rewrites. A rewrite from thestart drops the whole donation.
The identity check you asked for - and it says you are right
I measured it with
STRATA_STATE_HASH=1(the engine's per-request fingerprint of the session's K/V), on4x4090, Qwen3.8-Flash-Next IQ3_XXS, the same prompt twice, changing only
--prefill:--prefill 4096--prefill 1024kv(main K/V)2b0d5053ac25187342e1a97e3930a0fegdnd9d76ea6f358b80828dc7836c6f86255plebddc1f4570828abb5da58a4a271cda7bmtp(draft layer)dffb86c4cb55f6bd771c2991fbd6955aSame tokens, different chunking, different bytes. The control: the same chunking and the same prompt
after a restart gives the SAME fingerprint (
2b0d5053ac251873both times), so the difference is thechunking, not run-to-run noise.
So "equal token IDs do not establish that the K/V bytes are unchanged" is not a theoretical concern here - it
is observable on our own box, on the main K/V.
What that means for the two rules
limit_reuse(read_from)bound cuts the claim where this request rewrites. That is the "retained from animage actually restored into this session" case the contract describes.
prefix match establishes the token dependency, not the byte identity, and the bytes can differ across a
chunking boundary. In our production the chunking is fixed per process, so the donated prefix and the
recomputed one went through the same chunking - but that is a deployment accident, not an invariant, and
the rewind/replay and partial-page cases you list are not covered by it either.
I am therefore not asking to widen the skip-copy rule. What I would rather do is narrow the claim:
keep the storage reuse (which is what #3711 already does) and set
unchanged_tokens = 0for theprefix_rule donation, so the bytes are recopied and only the allocation is spared. On our box the
allocation reuse is the expensive half anyway - the park went from 3.5 s to 150 ms with the reuse, and the
copy of the contents is the smaller part of that.
If you would rather I keep the byte-identity argument, I would want the identity check to be the one you
describe: independently recomputed prefixes with different chunking and quantized K/V, plus rewinds and
partial-page boundaries, compared byte for byte. The measurement above is the start of that, but it is a
single chunking pair, not the full matrix.
Happy to send the harvest diff as a PR against your branch if that is easier to review than prose - it is
about 50 lines in
conversation_cache.hppplus the call site, and I can add the identity test I wrotealongside it (
conversation_reuse_identity_test, 19 checks, covering the prefix rule, the rewrite bound,and the negative control that a different prefix gives different bytes).
#3742 stays as it is: the per-stage copies, nothing from the harvest.
@wannagoxuf commented on GitHub (Oct 24, 2026):
Follow-up to the root cause posted here: the fresh-page tax has a small fix, now a pull request.
PR #3980 - "conversation buffer: advise 2 MiB huge pages on a fresh segment"
The host buffer the copies travel through (
ConversationBuffer, 16 MiB segments allocated fresh every turn and freed at the end of it) is a fresh mmap. On a host withTHP=madvise- the usual Linux default - glibc's segments never get 2 MiB pages on their own, so every page faults as 4 KiB and the device copy into the segment pays a page fault plus a per-page driver pin for pages it drops right after.One
madvise(MADV_HUGEPAGE)on the 2 MiB-aligned middle of a fresh reservation (the ragged head and tail stay 4 KiB) is the whole change. The advice goes in before the segment is resized, so the zero fill takes the huge pages too. Eviction is untouched: a huge page is an ordinary anonymous page andmunmapreturns it.Measured on the box in the earlier comment (one RTX 4090, device to host, 2 MiB pages):
End to end on this box, 4-way layer split, 9 concurrent clients x 3 rounds of ~110K-token conversations, per 100K tokens (n, median, mean, p90, max) - the same binary with and without the change:
| capture into the cache (fresh) | n=36 | 261 | 255 | 276 | 307 ms | -> | n=38 | 164 | 147 | 176 | 182 ms |
| capture into the cache (K/V reused) | n=17 | 136 | 130 | 150 | 156 ms | -> | n=15 | 132 | 120 | 141 | 144 ms |
| slot shuttle | n=64 | 64 | 101 | 285 | 329 ms | -> | n=64 | 63 | 80 | 142 | 193 ms |
The fresh capture is 1.6x faster and the slot shuttle's p90 halves. The reused capture barely moves, as it should - it copies into pages the kernel already knows.
The kernel may still refuse the advice under memory pressure; the copy then runs at the pageable speed as before, so the change is a hint, not a guarantee.
@yoggsaron010-lang commented on GitHub (Oct 25, 2026):
@wannagoxuf Thank you for running the identity check and sharing the control measurements. The same-token/different-chunking result makes the byte-identity concern concrete. I appreciate the careful validation and confirmation.
@oscarlius commented on GitHub (Oct 25, 2026):
Separating cache retention, copy cost and admission latency in a v0.2.5 follow-up
We have a partial follow-up on the same four-RTX-4090 Qwen3.8-Flash-Next IQ3_S system. The native 0.1.50 executable already includes #4002 plus the previously disclosed v0.2.5 serving changes; this is not an isolated OFF/ON test of #4002, and the new scheduler experiment is separate from that PR.
With explicit 16 slots / 16 groups, a cold preparation of 16 distinct approximately 130.8K-token histories completed correctly, followed by a byte-identical 16-request repeat. Every repeat reused approximately 130.8K tokens; all 16 slots held approximately 131K tokens before replay, and the replay's native trace contained no fresh prompt READ lines. Repeat TTFT was 14.316 s median / 27.484 s maximum, with 16/16 correct complete SSE responses. Thus genuine cache retention does not eliminate the remaining serialized admission/restore delay.
This uses a temporary 220 W profile and an experimental remaining-work scheduler hint. It should not be compared directly with earlier version/power results. An exploratory same-payload short-input comparison (preceding workload order not normalized; see below) measured a tradeoff: 16 groups produced 188.49 client output token/s versus 214.69 with 4 groups, with identical 3300 output tokens and per-request input/output hashes (16/16 correct in each). It is one pair, not final configuration acceptance. Other long mixed runs were stopped for unrelated traffic and remain incomplete.
The existing 32768 MiB minimum-free guard and 98304 MiB cache budget were preserved. We did not lower the RAM guard or skip K/V content copies to manufacture hits. In particular, equal token IDs remain scheduling hints only and do not establish unchanged K/V bytes. The native K/V operations remain responsible for actual reuse and copies. Cold-input throughput, cache retention, cache-copy time and waiting for native control need separate measurements; none of these observations proves the full #3321/#2275 system issue solved.
Full protocol details and limitations are in our companion #2275 follow-up. The existing #4002 v0.2.5 comment remains the scope-specific performance record for that PR.
Follow-up: first four-group cache-repeat result; preparation-order limitation
The four-group arm has now also completed the same 16-history cold preparation and identical replay: all 16 replay requests hit approximately 130.8K tokens, all responses were correct/complete, all per-request replay input/output hashes match the sixteen-group arm, and its replay native trace also has zero fresh READ lines. Four-group replay TTFT was 6.568 s median / 12.078 s maximum (3716 output tokens, 18.831 s whole-wave wall time), versus 14.316 / 27.484 s (40.469 s wall time) for sixteen groups. This is counterevidence to treating sixteen groups as the remedy, and it will not be promoted on the current data.
There is a protocol deviation in this first exploratory pair: the four-group short control ran before its long protocol, while the sixteen-group short control ran after its interrupted long protocol. Preceding workload/graph/cache preparation was therefore not normalized. The identical payload/output hashes and measured timings remain valid observations, but neither throughput difference nor the long-repeat latency difference is a completed causal group-count A/B. All old data are retained; no failed or interrupted run is relabelled as passed. A same-order, counterbalanced comparison is required for a causal speedup claim.
Follow-up: native-READ-gated remaining-work comparison (one complete pair)
We corrected an earlier timing-method limitation: a fixed two-second delay can send the hot request before cold native prefill starts. In this protocol, the hot request is sent only after observing a current-wave native slot actively reading an approximately 130.8K-token prompt, with at least 8192 tokens read and at least 32768 left. A fresh reading-state check immediately before POST is retained. TTFT starts at the actual hot POST; waiting to simulate the late arrival is not included.
Both arms use four groups / 16 slots, the same frozen request bodies, the same server source
0a40359f4999ee1c20e0643bfebb6e52154fd5601f558456b8fab27644034daband native executablef37e34b8de19218b1077e155802ac87dd63ef0c1498ca5052b362778fcc29f45, fresh native starts, and the same 220 W/fan profile. The experimentalSTRATA_YIELD_REMAININGflag is the OFF/ON difference. Short-first threshold 8192 and age override 30 s are unchanged. The native executable already contains #4002: this does not isolate that PR's effect.Every measured phase passed its strict six-key bare-JSON check, full SSE termination, and cache-evidence gates. All per-request input and output hashes match across arms. Each arm completed 68 measured requests plus three single-request preparations (71/71). The two gated warm requests actually reused the same 130809 / 130813 tokens in both arms. Native process identity and executable/source hashes remained stable within each arm.
For the gated 15-cold case, OFF posted while slot 4 had read 8192/130820 tokens; ON posted at 10240/130826. For the independent diagnostic, OFF posted at 14336/130821 and ON at 12288/130818. The ON traces prove one existing cold read yielded at 20480 / 22528 tokens, respectively, and resumed; its raw nonzero cache count is retained and classified as same-request resume with a unique native READ-from-zero/YIELD trace, not a pre-warmed cold request. The hot first token preceded that yielded cold request's first token. OFF showed no corresponding yield. The simultaneous mixed wave is not used as preemption proof.
This is one completed pair, not three counterbalanced rounds or production acceptance. Actual order was an initial OFF attempt aborted for unrelated traffic, then complete ON, then the single predeclared external-interference-only OFF retry; the original attempt is retained. An earlier R19 attempt also retains its strict fenced-JSON failure, and its fixed-delay timings are not used to prove preemption. No parser relaxation, discarded failure or silent retry was used.
The result supports a specific mechanism: cached long histories were being compared by total length when deciding to yield, so a nearly all-cached arrival could remain behind cold work. Remaining-work hints can make the existing yield path useful without treating matching token IDs as matching KV bytes. It does not remove serial cold-prefill capacity: cold16 remained about 164 s median. Nor does it prove all partial-cache tails work: a subsequent local patch for a 112522-cached + 24174-new-token selection case has CPU tests only and is not the source tested here. It is not deployed or submitted, and is not part of #4002.
Thermal observations are limited to this profile and workload: ON ran 1081 s (429 samples), OFF 1090 s (432 samples); per-card peak temperatures were 75/73/70/76 C and 75/72/71/77 C. Both had zero query-error samples, zero new thermal/power-brake counter increments and no active thermal/hardware-brake samples. Instantaneous power readings sometimes exceeded the configured 220 W cap and are retained; these are not constant-four-card-full-load tests, a validation of 300/320 W, or a matched 450 W performance comparison. GPU 0/3 fan targets were 100%, GPU 1/2 automatic.
The frozen short-input 16-client control ran last after the full long protocol in both arms, with unchanged within-arm native identity and cache_n=0 for all requests. Both produced 3300 completion tokens with identical per-request input/output hashes: OFF 13.838 s whole-wave wall time / 238.47 client output token/s, ON 13.302 s / 248.09 token/s. Each arm therefore completed 87/87 correct requests including preparations and the short control. This is one end-to-end control pair, not a decode-kernel speed claim or a randomized repeated result.
V3 partial-cache checkpoint probe: one hot response observed, paired run incomplete
A subsequent local serving patch (
4653161b, server SHA-25601a75147a93e6ea8ba010bc1b58bf9aaf0a3996ec41c15d9989796c390316c26) ranks only fresh priority-1 admissions by estimated remaining work; default-off and the short/age FIFO protection remain. It is separate from #4002 and has not been submitted or promoted. The native executable remains the same disclosed 0.1.50/f37 build.We constructed a new user turn using the real pack tokenizer, actual server renderer and token-ID turn-checkpoint rule, not character lengths. Measured warm length was 112529, full length 136696, maximal token LCP 112523, and stored warm turn-prefix 112522. The actual scheduler prefix-hint helper also returned 112522. Maximal LCP and reusable native checkpoint are different quantities; requiring them to be equal would reject this valid turn boundary.
In the ON probe, the hot request was posted after observing a current-wave cold slot reading 14336/130070 tokens, rechecked immediately before POST. Its actual response reported cache_n=112522, hence 24174 newly processed tokens, with 4.961489 s TTFT, correct six-key bare JSON and complete SSE. This tail is larger than the 8192 short cutoff. The trace includes a cold read giving way at24576. This is a synthetic repeated-padding functional probe, not a realistic-text throughput or financial-understanding benchmark.
The hot response finished before an unrelated additional client request arrived. The guard then cancelled only our remaining two cold connections: 3/5 test requests including preparation completed correctly; the overall ON wave is incomplete. The planned fresh OFF counterpart subsequently could not establish an idle baseline while a real client was generating; zero OFF test inference requests were sent. Its initial-idle timeout is not an observed Strata inference timeout.
Both attempts and raw counts are retained. No extra client was blocked or terminated, no failed attempt was reclassified as passed, and the original business service was recovered with its configuration/authentication preserved. We are waiting for an uncontended test window before further pressure. There is no paired V3 speedup, no three-round acceptance, no proof that all-cold queueing is solved, and no new merge-readiness claim from this observation. The older R22 comparison remains V2 evidence and is not counted as V3 testing.
@Niko1221 commented on GitHub (Nov 5, 2026):
Thanks for taking the time to report this.
Strata has changed a lot since this was opened, and 0.2.11 is out now, so many older reports no longer apply. We're closing issues older than a week that have had no new reports in the last week. Closed here does not mean rejected.
To reopen it takes about two minutes:
/reopen. A check runs and either reopens the issue or lists what is still missing.The rules are in CONTRIBUTING.md.