mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #2138] [Bug]: v0.1.43 STRATA_ADAPT_OVERLAP + --batch 2: ~21% throughput regression (2x RTX 3090 / dual EPYC, controlled 2x2) #856
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#856
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 @dynaxbill on GitHub (Oct 12, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2138
What happened
On two RTX 3090 cards, each running a single-GPU replica with --batch 2, v0.1.43's adaptive-overlap default reduces aggregate warm-cache throughput from 153.60 to 121.53 tok/s on the same immutable build (about 20.9% slower). Setting
STRATA_ADAPT_OVERLAP=0restores most of the release regression: matched v0.1.42 gives155.67 tok/s.The important additional evidence here is a 2x2 overlap ON/OFF x batch ON/OFF matrix, two fresh starts per condition with the second pass in reverse order, fixed per-GPU HTTP endpoints, and native batch timing plus thread scheduling data. The large loss reproduces in batch mode on this rig; solo mode is approximately neutral across the two starts.
Related: #1975, #2010 and proposed default/logging PR #2011. This report adds an Ampere/dual-socket replica-and-batching data point and identifies a specific batch synchronization path; it is not a layer-split report like #2038. Please consolidate into #2010 if you prefer to track the default and batch-path issue together.
Strata version, hardware, OS and dependencies
61b3fb5dd3f1e8ec09cf7e4e05208bc6d3c46406; v0.1.437695859aa13afb248bdb4d36f9b2e95707db079dCMAKE_CUDA_ARCHITECTURES=86, vision disabled; matching official engine + frontend, no engine/router patchRVN-Qwen3.8-Flash-Next-IQ3_S-merged.gguf; same GGUF/pack/tokenizer in every arm. Upstream model artifact revision was not recordedcudaHostRegister PORTABLEsucceeds. No explicit resident/mmap-experts mode; no explicit hugetlb allocation, transparent huge pages requestedThe Proxmox host has Samsung 990 PRO NVMe and Crucial MX200 SSD storage; the exact backing-device mapping of the benchmark's guest volume was not separately recorded, so I do not attribute the result to a specific storage device.
Third-party dependency provenance
The two images have byte-identical installed third-party trees.
setup.pydeclares llama.cpp revision3cf03257f219afbe7334045ff7c6a06ac68c627d, but setup reuses an existing cached tree and this installation was ZIP-based, without Git metadata. I have not independently proven that the cached tree equals that declared revision; the actual tree identity is supplied instead of guessing:third_party/llama.cpp:2824 regular files, snapshotSHA2568e0759767192b71eec3a3b104c22df71f5a8d94d9acd20dd392d05a7c27648b0..gitand__pycache__.8d1dfccba4b97f730eeec8eb0d4065d6f9b1226effc4df7ddbcdc2398df1c20e.f4488e718ceb87806560ee05d67313d663d71c676630ef65e5eb7b2c7d9757ad.All overlap comparisons use the same v0.1.43 binary and dependency snapshot, so the switch comparison does not depend on any toolchain/dependency change between releases.
Configuration and reproduction
Common native flags per replica (paths replaced with placeholders):
--trim-stage-weightsis inherited from the serving configuration; the native log says it is ignored without a layer split.--batch-groups 1stays fixed throughout and is not the batch ON/OFF switch.Common environment:
No
STRATA_ADAPT_OVERLAP_RESIDENT,--peer-device, layer split, pipeline windows, adapt-async, remote-expert-opt, or custom calibration. The full-arena branch is eligible for actual overlap; this is not an ineligible split/resident flag comparison. ON is explicitly confirmed by each native startup banner. OFF is asserted in the harness environment and recorded in the container launch command; v0.1.43 does not print an OFF banner.taskset -c0-31, configgpu:0,parallel:2, localhost port8100. ServerB: CPUs32-63,gpu:1,parallel:2, port8101. Each config uses the common flags above. This bypassesReplicaRouterdispatch variation while preserving one native engine per GPU.parallel:2, confirmed actual--batch 2in both native cmdlines: four total serving slots. Batch OFF:parallel:1, actual--batchabsent: two total serving slots, the same four requests queue.enable_thinking:false, SSE + usage. Identical request bytes are reused between every condition/version.(batch,overlap)=(1,1),(1,0),(0,0),(0,1); pass2: reverse. Recreate container/model state every leg. Add two identically configured v0.1.42 batch-ON controls in the same session.finish_reason:length, one[DONE], no SSE error, loaded health, and cache shape. Record native logs, per-request wall/TTFT/cache/hashes,/metrics, GPU telemetry, threadstat/schedstat, andnuma_maps.**440 requests total:**400 round requests plus40 warm primes. All exact-token/SSE/cache gates passed. GPU queries and ownership/lease checks succeeded at admission; each container drained before the next. Proxy overhead and production-client traffic are excluded. Host-wide CPU load outside the VM was not recorded.
Results
The metric below is aggregate end-to-end throughput,1024 generated tokens divided by wall time from first request start to last completion of a four-request burst. It includes prompt reading/cache restore and queueing; it is not single-GPU pure decode. Each pooled median/range contains six measured rounds (three from each fresh start).
With batch ON, disabling overlap gives +12.64% cold and +26.39% warm. v0.1.43 OFF is -0.17% cold/-1.33% warm relative to the matched v0.1.42 control; I do not assign a cause to that small residual with only two starts.
All measured-round throughput, not just the winning run
80.4095, 79.2907, 79.6429; warm155.6721, 154.8946, 150.2138tok/s.79.4423, 80.0010, 80.4451; warm158.0451, 157.8815, 155.6731tok/s.70.1768, 70.5113, 71.6731; warm120.8655, 125.2855, 122.1978tok/s.70.9797, 71.1561, 69.4736; warm118.9399, 120.5190, 123.1994tok/s.80.1792, 79.1716, 79.9178; warm153.3088, 153.1520, 157.9195tok/s.79.2404, 79.4629, 79.9103; warm152.4179, 153.8985, 156.8489tok/s.77.0298, 76.6042, 77.3094; warm152.3327, 151.6417, 141.3947tok/s.77.0900, 74.9986, 76.4673; warm141.8735, 142.0446, 150.1371tok/s.76.9571, 77.0904, 77.4310; warm149.7285, 147.1247, 142.9281tok/s.76.7551, 76.6121, 76.4428; warm147.5323, 150.9649, 145.0707tok/s.Native timing and suspected mechanism
GPU1 native batch timing, mean over six measured warm rounds:
The whole-window difference is6.415ms and adaptive-wait difference6.367ms: almost all the measured window delta is in refill synchronization.256 windows imply about1.630s additional adaptive waiting, consistent with the native wall-time difference of about1.730s. CPU expert/GPU-reach time is close. Mean swapped-expert count is4056.8 ON versus3932.3 OFF, about3.2% more, rather than the6x change in wait.
At the measured commit, the source suggests why this specifically hurts batch:
o.batch; independent single-GPU replicas are eligible.cudaLaunchHostFuncto update the gate; the completion event follows these callbacks.apply_pending(true)at the end of the window.Inference: the batch path can pay for the new host callbacks while retaining its whole-refill wait, without the same cross-window overlap benefit. The switch-level throughput and native wait delta are measured; this callback/dispatch explanation is source-supported, not a per-callback CUDA-profiler proof or a diagnosed driver bug.
Thread evidence supports host scheduling as an amplifier: over each five-round warm phase, GPU1's
cuda-EvtHandlraccumulates 2205/2511ms runqueue waiting with ON, against 26/24ms with OFF. ON also has a non-mainstratathread fixed to CPU32 with about6669ms runqueue waiting in the first warm phase; its exact role was not established from a call stack, so I do not label it definitively as the callback worker.Representative native log evidence
Controls, limits and workaround
STRATA_NAN_GUARD=1andSTRATA_PIN_GUARD=1are fixed across v0.1.43 conditions, not separately A/B tested here.--spec 4stays present, but I do not describe the batch difference as MTP acceleration.5f2a8a6786064eed72615e655c0ace5080bab85f52cf7e22b993faced1ef24c1. The local archive includes infrastructure receipts, so it has not been uploaded wholesale. All measured per-round throughput and relevant sanitized native log lines are provided above.Workaround on this rig: keep
--batch 2per replica (four total slots), setSTRATA_ADAPT_OVERLAP=0. Batch OFF sacrifices two slots and raises the last warm request's TTFT from about0.95s to3.8s, so total tok/s alone is insufficient to choose it.Could upstream exclude batch from this overlap path until batch gets equivalent deferred gate publication, or make the feature opt-in as proposed in #2011? An explicit ON/OFF startup log would also make applicability easier to verify. I have not tested a source patch, other GPU families, HIP/SYCL, or a callback-affinity change.
@dynaxbill commented on GitHub (Oct 12, 2026):
Production follow-up (separate qualification workload; not pooled with the controlled8192-token matrix above):
STRATA_ADAPT_OVERLAP=0, two single-GPU replicas,--batch 2each, pool31/groups1, native262144/int8 KV. NAN_GUARD1/PIN_GUARD1; existing sampling1.2/.97/30. Conversation parking16GiB/4slots/min8192 per replica; reasoning-loop recovery off.These are bounded serving qualification results. Real historical Hermes pathological-loop replay, full-logits KL, reboot testing and CUDA callback call-stack tracing were not performed. The main causal evidence remains the matched fixed-endpoint2x2+v0.1.42 control matrix in the initial post.
@Niko1221 commented on GitHub (Oct 19, 2026):
Thanks for taking the time to report this.
We're resetting the tracker for 0.2.0-beta. There are more than 1,300 open issues and pull requests, too many for us to read properly, so we're closing everything that isn't being worked on right now. 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.