mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3319] 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 #1346
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#1346
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/3319
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
@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?
@Niko1221 commented on GitHub (Oct 22, 2026):
Thanks — following up on the ask above: if you can share the diff or open a PR for the four changes, we'll review and test it. Also, #3319 and #3321 carry the same text; could you close one so the evidence lives in one place? If you can, add [Engine] to the title.
@wannagoxuf commented on GitHub (Oct 22, 2026):
Duplicate of #3321 (same text, filed twice by mistake). Closing this one so the evidence and the discussion live in one place, as Niko asked.
Keeping it here: the root cause (fresh pages faulted and pinned for every copy, not the bus), the microbenchmark and the four changes are all in #3321.