mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4537] [Engine] benefit-triggered prefetch closure loses its periodic retry inside the capacity hysteresis band #2049
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#2049
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 @cmdruid on GitHub (Oct 28, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4537
A benefit-triggered prefetch closure can lose its periodic retry while the cache-room ratio stays between the low and high watermarks. I reproduced this with the actual
FileExpertSource::gate_capacity()method compiled into a small CPU state-transition test. This is a reproduced controller defect; its contribution to GPU throughput is still being measured.Affected code checked:
011c9e600a93bbc9fd451c563501b5831c32bbca(installed 0.2.2 / engine 0.1.47), release5e8a4cca7d690ac60ca37eb09e7d0e010099ad6d(v0.2.7 / Linux engine 0.1.52), and main46c152a1310f77cd2f0ce2c7cd213962df14fe83. The decision method is identical in these revisions.Reproduction:
Expected: retain the benefit closure reason and probe again after 256 windows, unless actual capacity falls below the low watermark.
Actual: on the next decision after closure,
openis false, soroom_okrequires the high watermark. Inside the hysteresis band this is false and clearsgate_useless_. The retry branch is then unreachable until capacity rises above the high watermark. In the test, it never reopens across 3,000 windows. Above the high watermark, the same benefit closure retries as intended.The focused candidate uses the low watermark while a benefit closure is pending, preserving the existing high-watermark requirement for a real capacity closure. A drop below the low watermark cancels the pending benefit retry. The test covers threshold edges, a capacity drop during the retry interval, repeated benefit closures, unknown capacity and a disabled gate.
Reproducible test and candidate: tools/test_prefetch_gate.py.
Observed: patched 31 checks, 0 failures; unpatched 31 checks, 14 failing assertions. The test extracts the production method verbatim; the surrounding capacity/counter inputs are synthetic. It is not a full-engine or GPU throughput test.
Environment for the ongoing hardware qualification: Linux, two RTX 5070 Ti 16 GiB cards, Qwen3.8-Flash-Next UD-IQ4_XS, native MTP 4, 262144 context, int8 KV, mmap experts, prompt checkpoints and RAM conversation caching enabled, 40 GiB cgroup memory limit and zero swap. Earlier production logs showed persistent closure and slower decode, but did not establish the original closure reason. No throughput improvement is claimed here.
Validation completed: CUDA
sm_120release builds of both controls; five focused C++ conversation/session tests; 39 serving/context/tool/cancellation/accounting tests. HIP and SYCL environments are unavailable, so the accompanying PR will remain draft. The fix adds no shared mutable state and does not change the gate's call site or atomic publication.Related search: open/closed prefetch-gate discussions and PR #3324 were checked. That benchmark covers file-tier cost on a fully cacheable model; it does not cover this lost benefit-retry state.
@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.