mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[GH-ISSUE #4076] Monitor tiles are blank: /api/requests has no hit_rate, /v1/status vram has no fields (Control 0.1.49.2 + Qwen engine 0.1.48, Windows) #1772
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#1772
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 @sonic-netizen on GitHub (Oct 25, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/4076
Summary (for the report body — English)
Three separate display gaps in the desktop app's Monitor / Expert-settings screens on a
Control 0.1.49.2 + Qwen engine 0.1.48 install. All of the data exists on the server
(
GET /metricsreturns it), so this is a data-source / key-name problem in the UI layer, not ameasurement problem.
Environment
components/control/0.1.49.2(updated 0.1.48 -> 0.1.49.2 by the app's own updater, seecomponents/.updates/state.json)components/engine/0.1.48-windows-x86_64-cuda-cuda13— this is the newest Qwen engine published; the v0.2.4.2 notes say "every Qwen engine package stays as it was ... still the 0.1.48 file, byte for byte". So the install is not out of date: Control is ahead of the Qwen engine by design.swift-1.5-iq3_s(MoE,--expert-cache auto,--kv-resident 8192,--spec 3,--conversation-cache-slots 2 --conversation-cache-mib 4096)A. The Monitor page has no data source:
GET /api/requestsis 404serve/web/monitor.js:75requests the monitor data with no fallback:/api/requestsis gated by an opt-in flag that defaults off, so the request fails and the panelstays blank with no hint:
Live probe (model loaded, app running, key authorized):
The same numbers are served ungated by
GET /metrics, which the bundled web monitor (serve/web/app.js:2,353) uses —requests[n].hit_rateandpcie_shareare present there:A2. Turning
api_monitoron is not enough: the rows/api/requestsreturns carry no hit-rate fieldThe user added
"api_monitor": trueand"vram_elastic": trueto the run config and reloaded themodel (the engine log's new start line contains
--vram-elastic, verified). Re-probing:GET /api/requestsis produced byrequest_records()(server.py:4585-4596) from the record builtin
begin_request()(server.py:4572-4579): that record only carries the request's path, model,input/output and queue/load/first-token timings. The per-request engine statistics (
hit_rate,pcie_share,decode_tok_s,reused,drafts_*) are appended to a different container,self.history(server.py:5505-5524), which only/metricsreturns. The two containers do notshare an id:
begin_requestmintsrecord["id"] = uuid4().hex[:12](server.py:4572) while therequest path mints its own
request_id = uuid4().hex[:12](server.py:5169-5170), so there istoday no key to join them on.
Result: the desktop app's Monitor page (
serve/web/monitor.js:75, which only reads/v1/statusand/api/requests) structurally cannot show the cache hit rate — the field itlabels 显存命中率 is not in any endpoint it reads.
Suggested fix, either:
begin_request, or storerecord["id"]on thecancel object next to
_strata_request_id) and merge the matchingself.historyrow intorequest_records(); or/metrics(whichserve/web/app.jsalready does, including thehit-rate line at
app.js:353and "Experts in VRAM" atapp.js:391).B2. After
"vram_elastic": true,/v1/statusstill reports only{"elastic": true}With the elastic engine running,
GET /v1/statusgives"vram": {"elastic": true}— no reserve, nosegment, no expert-cache numbers — while the same engine's flat keys are live in
/metrics -> engine:so
info.get("vram")(server.py:4723-4725) is empty on this engine and the app's VRAM tile staysempty even with the feature switched on. The flat-key fallback in B is what makes the tile work.
Suggested fix: have the app's monitor page report the reason in one line ("set
api_monitor: truein the run config") instead of failing silently, or enable
api_monitorautomatically when thedesktop app starts the server (the desktop app is the intended user of this page;
serve/web/app.jsalready works off
/metricsand would be a fine fallback).B.
GET /v1/statusreturns an emptyvramobject on the current Qwen engineThe GPU's used/total come from
machine, so only the expert-cache / reserve fields are missing.The status builder reads a nested
vramdict out of the engine info (server.py:4723-4725):Engine 0.1.48 reports those fields flat, and they are visible in
GET /metrics -> engine:serve/web/app.js:391reads the flat keys and shows them correctly ("Experts in VRAM" fromeng.expert_slots), so the nested lookup in/v1/statusis the odd one out.Suggested fix: in
/v1/status, fall back to the flat keys wheninfo["vram"]is empty, e.g.{"expert_slots": info.get("expert_slots"), "expert_cache_mib": info.get("expert_cache_mib"), "vram_free_mib": info.get("vram_free_mib"), ...}.Note:
--vram-elasticis supported by the 0.1.48 engine (strata.exe --help:--vram-elastic --serve (#533, opt-in, NVIDIA): the expert cache in segments ... the server's POST /v1/vram).Enabling it (
"vram_elastic": truein the run config,server.py:3120-3123) gives the app a livereserve, so this part can be worked around today by the user; B is still worth fixing because it
breaks the panel on a default install.
C.
/v1/vramis POST-only, so a monitoring poll gets 404server.py:6811defines/v1/vramonly indo_POST. A panel that polls it with GET gets404 not found(verified) and shows nothing, with no way to tell "not supported" from "no data".Suggested fix: answer GET on
/v1/vramwith the current reserve/segments (the data POST returns),and answer POST with 409 + a message when the engine lacks
--vram-elastic(today the 404 isindistinguishable from a typo'd path).
C2. What the desktop app's own (Chinese) tiles can read, and what is missing
The 显存命中率 / 显存 tiles in the desktop app's UI are not in the control component's web assets
(
serve/web/*.js|*.htmlcontain no CJK strings; the bundled page is English: "Experts in VRAM","Prefill t/s"), and
strata-desktop.exehas no readable UI strings, so the tiles are compiled intothe app bundle and cannot be inspected or patched locally. What can be measured is the data they
depend on — both sources are missing the fields:
So on this stack the only endpoint carrying the cache hit rate is
/metrics, and the controlcomponent's own Monitor tab (
serve/web/app.js:2,353,391) reads it and works. Suggested fix for thedesktop app: read
/metricsfor these two tiles (that is what the shipped web monitor does), andadd the flat-key fallback to
/v1/statusfor the VRAM fields.Workaround in use today, with the verified results:
"api_monitor": true->GET /api/requestswent from 404 to 200 (11 rows with timings),"vram_elastic": true-> the engine starts with--vram-elastic(log line verified),/v1/statusnow reports
"vram": {"elastic": true}, soPOST /v1/vram <reserve_mib>is live and the reserveno longer needs a model reload,
(
http://127.0.0.1:<port>/, English), which reads/metrics.The panel shows, for the settings file it opens:
Both keys are written and used by Strata's own setup/app code and are documented as such:
The warning invites the user to delete them.
user_argsis where the user's own options arerecorded — on this machine it holds
--prefill auto:8192 --spec 3 --kv-resident 8192 --conversation-cache-mib 4096 --conversation-cache-slots 2 --conversation-cache-min-free-mib 4096 --conversation-cache-min-tokens 8192 --vram-reserve-mib ...; deleting it (orargs_written, whichmakes every current option look hand-added,
setup.py:6220) can cost the user their settings onthe next rewrite.
Suggested fix: treat
user_argsandargs_writtenas known internal keys in the settings-filevalidator (list them with the other app keys), and never suggest deleting them.
How this was hit (repro)
Tuning
--vram-reserve-mib(4096 -> 2048 -> 3072) on a display-attached 16 GB card, the Monitorscreen showed nothing for VRAM and the cache hit rate, while the engine log carries it, e.g.:
Steps for a maintainer:
api_monitor, novram_elastic).GET /api/requestswith the model's api key -> 404;GET /v1/status->"vram": {"elastic": false};GET /metrics->requests[0].hit_rateandengine.expert_slotsare both present.user_args/args_writtenwarnings.Workaround in use today
Both new keys are read when the server starts (
server.py:8519,server.py:3120-3123), so themodel has to be reloaded (app stop + load) for them to take effect. After the reload on this machine
(engine start line contains
--vram-elastic):/api/requestsanswers 200 with request timings,/v1/statusreports"vram": {"elastic": true}andPOST /v1/vramis usable — but the app's显存命中率 tile still cannot fill, because neither endpoint it reads carries the hit rate
(sections A2 and C2). The tiles are fixed only by the suggested server/app changes.
繁體中文摘要(給使用者/維護者看的重點)
/api/requests。這個端點預設關閉(設定鍵api_monitor: true才開)→ 回 404,畫面空白也沒有提示。本机已把它開好(實測 404 → 200),命中率還是不顯示:該端點每筆請求只有時間欄位(first_token_s、wallclock_s、queue_s、usage…),沒有hit_rate/hits/lookups;命中率只在/metrics裡(實測 0.614–0.709)。兩套記錄連 id 都不共用(server.py:4572與server.py:5169各發一個 uuid),所以目前無法串起來 → 建議把 id 串接後合併,或讓 app 直接讀/metrics。/v1/status的vram預設只回{"elastic": false};本機把vram_elastic: true開好、引擎也確實帶--vram-elastic啟動了,它仍只回{"elastic": true},沒有專家快取/預留值,因為控制端讀「巢狀的 vram」,而 Qwen 引擎 0.1.48 是平鋪回報(/metrics→ engine:expert_slots 2456、expert_cache_mib 4828、vram_free_mib 2648)。建議/v1/status加平鋪回退。/v1/vram只有 POST:監控若用 GET 去轮询会拿到 404,無法區分「不支援」與「沒資料」。user_args與args_written是 Strata 自己的記錄鍵(strata_control/user_args.py、setup.py:6164),刪掉會丢掉你自己那些選項的記錄(交談快取 2 槽 4 GiB、--spec 3等都在user_args裡)。/metrics)有全部資料 — 命中率 0.634、顯存 13.7 GiB(含 60 點歷史曲線)、專家快取 2456 槽 / 4.7 GiB。桌面 app 的中文磚位在strata-desktop.exe裡(字串是壓縮的,本機無法就地修改),所以那兩格要等官方修。vram_elastic: true之後,顯存預留值可以用POST /v1/vram即時調整,不用重載模型。@github-actions[bot] commented on GitHub (Oct 25, 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
@github-actions[bot] commented on GitHub (Oct 30, 2026):
Closing this issue because it still did not follow the format after 5 days. That is housekeeping, not a rejection.
To bring it back: fix the title (area prefix) and the missing parts, then comment
/reopen. A check runs and reopens it, or tells you what is still missing. See CONTRIBUTING.md.gr_mix_r: no kernel image is availableon engine 0.1.52 (HIP) #1980