mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #3849] [Benchmark] --batch loses expert-cache hit rate on 2x RTX 3060 (12 GB): 99% -> 86% #1637
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#1637
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 @CaptRauti on GitHub (Oct 23, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/3849
"""## [Benchmark] Concurrency on 2x RTX 3060 (12 GB): --batch loses expert-cache hit rate 99% -> 86%
Full report with numbers: pushed to
community-results/fenris-concurrency/in my fork(CaptRauti/Strata, branch
docs/fenris-concurrency), plus a parametrized benchmark script.Hardware (maintainers don't have it)
What I measured (engine-internal, warm) — 2 concurrent streams, 80 tokens
parallel: 1(sequential)parallel: 2(--batch 2)parallel: 4(--batch 4, 2 groups x 2)Finding (why it matters upstream)
--batch N— the engine's stream batching, measured fast on 2x A4000 and 2x RTX 3090 — isnot a win on two 12 GB cards: each slot allocates its own KV copy, which shrinks the
expert cache, so hit rate falls (99 % -> 86-88 %) and PCIe expert reads grow. Sequential
(
parallel: 1) has the best single-stream rate AND the best average completion time here.The likely on-device path to batch speedup on small VRAM is shared/pooled KV across slots
(paged KV), so streams fuse without a per-slot
max_contextKV reservation.Not tested: vision under batch, >4 slots, other quant levels. Everything measured same-day
against the running engine (100 W / 1650 MHz).
@qni-live commented on GitHub (Oct 25, 2026):
Counter-data from a rig where the expert cache has room: with
--batch 4the hit rate does not drop here, so this supports reading the 12 GB result as a VRAM-budget effect rather than something--batchdoes on its own.Setup: 2x RTX PRO 4500 Blackwell (32 GB each), layer split auto (K=25), Strata 0.2.6 (engine 0.1.50), official ISTA IQ3_XXS,
strata launch --tune skipdefaults: 128K context, int8 KV, MTP,--batch 4. The log shows the cost of--batchand what is left:--batch 4: the slot sessions take 3.85 GiB of VRAM on CUDA0 that the expert cache would otherwise hold, and stillexpert cache 12288 slots, 17.72 GiBon CUDA0 and11176 slots (20.24 GiB), 11176 of its 12288 profiled pairson CUDA1. So the cache keeps (almost) the whole profile even with four slots.Hit rate: the
decode expert cache hit ratelines of one run (73 requests: 1, 2, 4 and 8 clients, 4 rounds each, 800 output tokens) add up to 1,136,659 hits of 1,138,855 lookups = 99.8% with the default (one serial group), and 1,138,579 of 1,140,775 = 99.8% with--batch-groups 2(pipelined). No drop between 1 and 8 clients.Throughput (
tools/serve_load.py, total tok/s, median of 4 rounds, two passes each):--batch-groups auto(2 groups of 2)So batching pays here: 4 clients give 1.4x the single-stream total with the serial group and 1.8x with the pipelined groups (see #4129 for that comparison).
What this does and does not show: it does not reproduce the hit-rate loss. The log line about the slot sessions taking VRAM from the cache is consistent with your mechanism (per-slot KV copies shrinking the cache), but here 3.85 GiB comes out of a cache that still holds the whole profile, so I cannot say what happens when it does not. Different model and quant than yours (IQ3_XXS, not IQ2_XS), different card, idle server, short essay prompts. I did not try a 12 or 16 GB card or a smaller
max_contextwith--batch.The measurements were run by Claude Code (Anthropic) on my PC; I reviewed the numbers and this comment before posting.
@Niko1221 commented on GitHub (Oct 29, 2026):
Thank you for measuring this and writing it up. We are building a Strata website with a page for community benchmarks, and results like these will be added there when it launches, so we are closing this here. If your numbers change with a new version, you are welcome to post them again.
--batch-groups auto#3573--adapt-async 1beside slots) #3576