[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

Closed
opened 2026-11-04 01:53:55 +07:00 by bsakaguchi · 2 comments
Owner

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 /metrics returns it), so this is a data-source / key-name problem in the UI layer, not a
measurement problem.

Environment

  • Windows 11 Pro, build 26300
  • Desktop app: the 0.2.x app (the v0.2.4.2 release notes state "The app stays 0.2.3")
  • Control component: components/control/0.1.49.2 (updated 0.1.48 -> 0.1.49.2 by the app's own updater, see components/.updates/state.json)
  • Engine component: 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.
  • Hardware: RTX 5080 16 GB (display-attached), Ryzen 9 9950X3D, 96 GB DDR5-5600
  • Model: 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/requests is 404

serve/web/monitor.js:75 requests the monitor data with no fallback:

const [status, history] = await Promise.all([api("/v1/status"), api("/api/requests")]);

/api/requests is gated by an opt-in flag that defaults off, so the request fails and the panel
stays blank with no hint:

server.py:3879  # so it is off unless the config's "api_monitor" (or --api-monitor) turns it on
server.py:3880      self.api_monitor = False
server.py:6607      if path == "/api/requests" and svc.api_monitor:
server.py:8519      svc.api_monitor = a.api_monitor or cfg.get("api_monitor") is True

Live probe (model loaded, app running, key authorized):

GET /api/requests  ->  HTTP 404  {"error": {"message": "not found"}}

The same numbers are served ungated by GET /metrics, which the bundled web monitor (serve/web/app.js:2,353) uses — requests[n].hit_rate and pcie_share are present there:

GET /metrics ->
  requests[0] = {"prompt_tokens": 132047, "reused": 131631, "output_tokens": 274,
                 "decode_tok_s": 114.0, "hit_rate": 0.607, "pcie_share": 0.188,
                 "drafts_offered": 216, "drafts_accepted": 210, ...}

A2. Turning api_monitor on is not enough: the rows /api/requests returns carry no hit-rate field

The user added "api_monitor": true and "vram_elastic": true to the run config and reloaded the
model (the engine log's new start line contains --vram-elastic, verified). Re-probing:

GET /api/requests -> 200  {"auto_load":..,"loaded":..,"persistent":..,"retention":..,"requests":[..]}
        requests[0] keys: id, path, model, started_at, state, stream, response_format,
                          queue_s, load_s, first_token_s, wallclock_s
        -> hit_rate: None, decode_tok_s: None          # 沒有命中率、沒有复用数
GET /metrics     -> 200  requests[0].hit_rate = 0.473, decode_tok_s = ...   (the same engine, the same moment)
GET /v1/status   -> 200  "vram": {"elastic": true}      # 仍然只有 elastic,沒有 expert_slots / reserve

GET /api/requests is produced by request_records() (server.py:4585-4596) from the record built
in 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 /metrics returns. The two containers do not
share an id: begin_request mints record["id"] = uuid4().hex[:12] (server.py:4572) while the
request path mints its own request_id = uuid4().hex[:12] (server.py:5169-5170), so there is
today no key to join them on.

Result: the desktop app's Monitor page (serve/web/monitor.js:75, which only reads
/v1/status and /api/requests) structurally cannot show the cache hit rate
— the field it
labels 显存命中率 is not in any endpoint it reads.

Suggested fix, either:

  • give the trace record the request id (pass it into begin_request, or store record["id"] on the
    cancel object next to _strata_request_id) and merge the matching self.history row into
    request_records(); or
  • point the app's Monitor page at /metrics (which serve/web/app.js already does, including the
    hit-rate line at app.js:353 and "Experts in VRAM" at app.js:391).

B2. After "vram_elastic": true, /v1/status still reports only {"elastic": true}

With the elastic engine running, GET /v1/status gives "vram": {"elastic": true} — no reserve, no
segment, no expert-cache numbers — while the same engine's flat keys are live in /metrics -> engine:

"engine": {"version": "0.1.48", "expert_slots": 2456, "expert_cache_mib": 4828,
           "vram_free_mib": 2648, "kv": "int8", "kv_resident": 20480,
           "pool_workers": 15, "spec": 5, "mtp_max": 3, "lookup": 3}

so info.get("vram") (server.py:4723-4725) is empty on this engine and the app's VRAM tile stays
empty 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: true
in the run config") instead of failing silently, or enable api_monitor automatically when the
desktop app starts the server (the desktop app is the intended user of this page; serve/web/app.js
already works off /metrics and would be a fine fallback).

B. GET /v1/status returns an empty vram object on the current Qwen engine

GET /v1/status ->
  "engine": "0.1.48",
  "vram": {"elastic": false},
  "machine": {"gpu": {"name":"NVIDIA GeForce RTX 5080","used_mib":14297.0,"total_mib":16303.0, ...}}

The GPU's used/total come from machine, so only the expert-cache / reserve fields are missing.
The status builder reads a nested vram dict out of the engine info (server.py:4723-4725):

"vram": dict((getattr(self.engine, "info", {}) or {}).get("vram") or {},
             elastic=bool((getattr(self.engine, "info", {}) or {}).get("vram_elastic"))),

Engine 0.1.48 reports those fields flat, and they are visible in GET /metrics -> engine:

"engine": {"version": "0.1.48", "expert_slots": 2669, "expert_cache_mib": 5242,
           "expert_slots_primary": 2669, "expert_cache_primary_mib": 5242,
           "vram_free_mib": 2649, "kv": "int8", "kv_resident": 20480,
           "spec": 5, "mtp_max": 3, "lookup": 3, "pool_workers": 15, "arena_mib": 47962}

serve/web/app.js:391 reads the flat keys and shows them correctly ("Experts in VRAM" from
eng.expert_slots), so the nested lookup in /v1/status is the odd one out.

Suggested fix: in /v1/status, fall back to the flat keys when info["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-elastic is 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": true in the run config, server.py:3120-3123) gives the app a live
reserve, 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/vram is POST-only, so a monitoring poll gets 404

server.py:6811 defines /v1/vram only in do_POST. A panel that polls it with GET gets
404 not found (verified) and shows nothing, with no way to tell "not supported" from "no data".
Suggested fix: answer GET on /v1/vram with the current reserve/segments (the data POST returns),
and answer POST with 409 + a message when the engine lacks --vram-elastic (today the 404 is
indistinguishable 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|*.html contain no CJK strings; the bundled page is English: "Experts in VRAM",
"Prefill t/s"), and strata-desktop.exe has no readable UI strings, so the tiles are compiled into
the 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:

GET /v1/status   "vram" = {"elastic": true}                          # 沒有 expert_slots / reserve / hit rate
GET /api/requests requests[0] fields (all 11 rows, state=completed):
      finished_at, first_token_s, http_status, id, input_truncated, load_s, model, output_truncated,
      path, queue_s, reasoning_truncated, response_format, started_at, state, stream, timings, usage,
      wallclock_s                                                     # 沒有 hit_rate / hits / lookups
GET /metrics     requests[0].hit_rate = 0.634 ... 0.709              # 命中率在這裡
                 hardware.gpu_mem_used = 14,787,842,048 + 60 點 history
                 engine.expert_slots = 2456, expert_cache_mib = 4828, vram_free_mib = 2648

So on this stack the only endpoint carrying the cache hit rate is /metrics, and the control
component's own Monitor tab (serve/web/app.js:2,353,391) reads it and works. Suggested fix for the
desktop app: read /metrics for these two tiles (that is what the shipped web monitor does), and
add the flat-key fallback to /v1/status for the VRAM fields.

Workaround in use today, with the verified results:

  • "api_monitor": true -> GET /api/requests went from 404 to 200 (11 rows with timings),
  • "vram_elastic": true -> the engine starts with --vram-elastic (log line verified), /v1/status
    now reports "vram": {"elastic": true}, so POST /v1/vram <reserve_mib> is live and the reserve
    no longer needs a model reload,
  • the cache hit rate and the expert cache are watched on the model server's own Monitor page
    (http://127.0.0.1:<port>/, English), which reads /metrics.

The panel shows, for the settings file it opens:

第 56 行: "user_args" 不是 Strata 会读取的设置,因此会被忽略。
第 88 行: "args_written" 不是 Strata 会读取的设置,因此会被忽略。

Both keys are written and used by Strata's own setup/app code and are documented as such:

strata_control/user_args.py:10   "args_written": the whole "args" as setup or the app last wrote it ...
strata_control/user_args.py:25   WRITTEN_KEY = "args_written"
strata_control/user_args.py:93   the person's options of a config: its "user_args", with the options of "args"
                                 that differ from "args_written" (added or changed by hand) on top
setup.py:6164                    # "args_written" ... is setup's own; "user_args" is not in SETUP_KEYS on
                                 # purpose: carry_over keeps it
setup.py:6167                    ... "gpu", "gpus_asked", ..., "vision", "args_written"})

The warning invites the user to delete them. user_args is where the user's own options are
recorded — 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 (or args_written, which
makes every current option look hand-added, setup.py:6220) can cost the user their settings on
the next rewrite.

Suggested fix: treat user_args and args_written as known internal keys in the settings-file
validator (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 Monitor
screen showed nothing for VRAM and the cache hit rate, while the engine log carries it, e.g.:

strata serve: decode expert cache hit rate: 67.5% (1903904 hits / 2821582 lookups); 500946 more read by the GPU over PCIe or from another GPU (15.1% of all 3322528 routed)
strata serve: WARNING: only 253 MiB of VRAM free at the start of this request (below 1024 MiB): when the card is this full the driver can page GPU memory to system RAM, decode falls to a few tok/s and a window may never ...

Steps for a maintainer:

  1. Load a model through the desktop app on Windows (default run config: no api_monitor, no vram_elastic).
  2. Open the app's Monitor screen -> the VRAM / hit-rate tiles are empty.
  3. GET /api/requests with the model's api key -> 404; GET /v1/status -> "vram": {"elastic": false};
    GET /metrics -> requests[0].hit_rate and engine.expert_slots are both present.
  4. Open the Expert-settings screen -> the two user_args / args_written warnings.

Workaround in use today

"api_monitor": true,
"vram_elastic": true,
"vram_reserve_mib": 3072,
"args": [..., "--vram-reserve-mib", "3072"]

Both new keys are read when the server starts (server.py:8519, server.py:3120-3123), so the
model 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/requests answers 200 with request timings,
/v1/status reports "vram": {"elastic": true} and POST /v1/vram is 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.


繁體中文摘要(給使用者/維護者看的重點)

  1. 監控畫面空白:監控頁讀 /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。
  2. 顯存那欄空白:/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 加平鋪回退。
  3. /v1/vram 只有 POST:監控若用 GET 去轮询会拿到 404,無法區分「不支援」與「沒資料」。
  4. 专家设置的兩行警告是誤報:user_args 與 args_written 是 Strata 自己的記錄鍵(strata_control/user_args.py、setup.py:6164),刪掉會丢掉你自己那些選項的記錄(交談快取 2 槽 4 GiB、--spec 3 等都在 user_args 裡)。
  5. 你這台沒有裝到舊版:Control 0.1.49.2 是最新,Qwen 引擎最新就是 0.1.48(官方發布說明原文:every Qwen engine package stays as it was)。
  6. 現在就能看的監控:模型伺服器自帶的監控頁(英文,資料來源 /metrics)有全部資料 — 命中率 0.634、顯存 13.7 GiB(含 60 點歷史曲線)、專家快取 2456 槽 / 4.7 GiB。桌面 app 的中文磚位在 strata-desktop.exe 裡(字串是壓縮的,本機無法就地修改),所以那兩格要等官方修。
  7. 附帶好處:vram_elastic: true 之後,顯存預留值可以用 POST /v1/vram 即時調整,不用重載模型。
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 /metrics` returns it), so this is a data-source / key-name problem in the UI layer, not a measurement problem. ## Environment - Windows 11 Pro, build 26300 - Desktop app: the 0.2.x app (the v0.2.4.2 release notes state "The app stays 0.2.3") - Control component: `components/control/0.1.49.2` (updated 0.1.48 -> 0.1.49.2 by the app's own updater, see `components/.updates/state.json`) - Engine component: `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. - Hardware: RTX 5080 16 GB (display-attached), Ryzen 9 9950X3D, 96 GB DDR5-5600 - Model: `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/requests` is 404 `serve/web/monitor.js:75` requests the monitor data with no fallback: ```js const [status, history] = await Promise.all([api("/v1/status"), api("/api/requests")]); ``` `/api/requests` is gated by an opt-in flag that defaults off, so the request fails and the panel stays blank with no hint: ``` server.py:3879 # so it is off unless the config's "api_monitor" (or --api-monitor) turns it on server.py:3880 self.api_monitor = False server.py:6607 if path == "/api/requests" and svc.api_monitor: server.py:8519 svc.api_monitor = a.api_monitor or cfg.get("api_monitor") is True ``` Live probe (model loaded, app running, key authorized): ``` GET /api/requests -> HTTP 404 {"error": {"message": "not found"}} ``` The same numbers are served ungated by `GET /metrics`, which the bundled web monitor (`serve/web/app.js:2,353`) uses — `requests[n].hit_rate` and `pcie_share` are present there: ``` GET /metrics -> requests[0] = {"prompt_tokens": 132047, "reused": 131631, "output_tokens": 274, "decode_tok_s": 114.0, "hit_rate": 0.607, "pcie_share": 0.188, "drafts_offered": 216, "drafts_accepted": 210, ...} ``` ### A2. Turning `api_monitor` on is not enough: the rows `/api/requests` returns carry no hit-rate field The user added `"api_monitor": true` and `"vram_elastic": true` to the run config and reloaded the model (the engine log's new start line contains `--vram-elastic`, verified). Re-probing: ``` GET /api/requests -> 200 {"auto_load":..,"loaded":..,"persistent":..,"retention":..,"requests":[..]} requests[0] keys: id, path, model, started_at, state, stream, response_format, queue_s, load_s, first_token_s, wallclock_s -> hit_rate: None, decode_tok_s: None # 沒有命中率、沒有复用数 GET /metrics -> 200 requests[0].hit_rate = 0.473, decode_tok_s = ... (the same engine, the same moment) GET /v1/status -> 200 "vram": {"elastic": true} # 仍然只有 elastic,沒有 expert_slots / reserve ``` `GET /api/requests` is produced by `request_records()` (`server.py:4585-4596`) from the record built in `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 `/metrics` returns. The two containers do not share an id: `begin_request` mints `record["id"] = uuid4().hex[:12]` (`server.py:4572`) while the request path mints its own `request_id = uuid4().hex[:12]` (`server.py:5169-5170`), so there is today no key to join them on. **Result: the desktop app's Monitor page (`serve/web/monitor.js:75`, which only reads `/v1/status` and `/api/requests`) structurally cannot show the cache hit rate** — the field it labels 显存命中率 is not in any endpoint it reads. Suggested fix, either: - give the trace record the request id (pass it into `begin_request`, or store `record["id"]` on the cancel object next to `_strata_request_id`) and merge the matching `self.history` row into `request_records()`; or - point the app's Monitor page at `/metrics` (which `serve/web/app.js` already does, including the hit-rate line at `app.js:353` and "Experts in VRAM" at `app.js:391`). ### B2. After `"vram_elastic": true`, `/v1/status` still reports only `{"elastic": true}` With the elastic engine running, `GET /v1/status` gives `"vram": {"elastic": true}` — no reserve, no segment, no expert-cache numbers — while the same engine's flat keys are live in `/metrics -> engine`: ```json "engine": {"version": "0.1.48", "expert_slots": 2456, "expert_cache_mib": 4828, "vram_free_mib": 2648, "kv": "int8", "kv_resident": 20480, "pool_workers": 15, "spec": 5, "mtp_max": 3, "lookup": 3} ``` so `info.get("vram")` (`server.py:4723-4725`) is empty on this engine and the app's VRAM tile stays empty 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: true` in the run config") instead of failing silently, or enable `api_monitor` automatically when the desktop app starts the server (the desktop app is the intended user of this page; `serve/web/app.js` already works off `/metrics` and would be a fine fallback). ## B. `GET /v1/status` returns an empty `vram` object on the current Qwen engine ``` GET /v1/status -> "engine": "0.1.48", "vram": {"elastic": false}, "machine": {"gpu": {"name":"NVIDIA GeForce RTX 5080","used_mib":14297.0,"total_mib":16303.0, ...}} ``` The GPU's used/total come from `machine`, so only the expert-cache / reserve fields are missing. The status builder reads a **nested** `vram` dict out of the engine info (`server.py:4723-4725`): ```python "vram": dict((getattr(self.engine, "info", {}) or {}).get("vram") or {}, elastic=bool((getattr(self.engine, "info", {}) or {}).get("vram_elastic"))), ``` Engine 0.1.48 reports those fields **flat**, and they are visible in `GET /metrics -> engine`: ```json "engine": {"version": "0.1.48", "expert_slots": 2669, "expert_cache_mib": 5242, "expert_slots_primary": 2669, "expert_cache_primary_mib": 5242, "vram_free_mib": 2649, "kv": "int8", "kv_resident": 20480, "spec": 5, "mtp_max": 3, "lookup": 3, "pool_workers": 15, "arena_mib": 47962} ``` `serve/web/app.js:391` reads the flat keys and shows them correctly ("Experts in VRAM" from `eng.expert_slots`), so the nested lookup in `/v1/status` is the odd one out. Suggested fix: in `/v1/status`, fall back to the flat keys when `info["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-elastic` **is** 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": true` in the run config, `server.py:3120-3123`) gives the app a live reserve, 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/vram` is POST-only, so a monitoring poll gets 404 `server.py:6811` defines `/v1/vram` only in `do_POST`. A panel that polls it with GET gets `404 not found` (verified) and shows nothing, with no way to tell "not supported" from "no data". Suggested fix: answer GET on `/v1/vram` with the current reserve/segments (the data POST returns), and answer POST with 409 + a message when the engine lacks `--vram-elastic` (today the 404 is indistinguishable 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|*.html` contain no CJK strings; the bundled page is English: "Experts in VRAM", "Prefill t/s"), and `strata-desktop.exe` has no readable UI strings, so the tiles are compiled into the 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: ``` GET /v1/status "vram" = {"elastic": true} # 沒有 expert_slots / reserve / hit rate GET /api/requests requests[0] fields (all 11 rows, state=completed): finished_at, first_token_s, http_status, id, input_truncated, load_s, model, output_truncated, path, queue_s, reasoning_truncated, response_format, started_at, state, stream, timings, usage, wallclock_s # 沒有 hit_rate / hits / lookups GET /metrics requests[0].hit_rate = 0.634 ... 0.709 # 命中率在這裡 hardware.gpu_mem_used = 14,787,842,048 + 60 點 history engine.expert_slots = 2456, expert_cache_mib = 4828, vram_free_mib = 2648 ``` So on this stack the **only** endpoint carrying the cache hit rate is `/metrics`, and the control component's own Monitor tab (`serve/web/app.js:2,353,391`) reads it and works. Suggested fix for the desktop app: read `/metrics` for these two tiles (that is what the shipped web monitor does), and add the flat-key fallback to `/v1/status` for the VRAM fields. Workaround in use today, with the verified results: - `"api_monitor": true` -> `GET /api/requests` went from 404 to 200 (11 rows with timings), - `"vram_elastic": true` -> the engine starts with `--vram-elastic` (log line verified), `/v1/status` now reports `"vram": {"elastic": true}`, so `POST /v1/vram <reserve_mib>` is live and the reserve no longer needs a model reload, - the cache hit rate and the expert cache are watched on the model server's own Monitor page (`http://127.0.0.1:<port>/`, English), which reads `/metrics`. The panel shows, for the settings file it opens: ``` 第 56 行: "user_args" 不是 Strata 会读取的设置,因此会被忽略。 第 88 行: "args_written" 不是 Strata 会读取的设置,因此会被忽略。 ``` Both keys are written and used by Strata's own setup/app code and are documented as such: ``` strata_control/user_args.py:10 "args_written": the whole "args" as setup or the app last wrote it ... strata_control/user_args.py:25 WRITTEN_KEY = "args_written" strata_control/user_args.py:93 the person's options of a config: its "user_args", with the options of "args" that differ from "args_written" (added or changed by hand) on top setup.py:6164 # "args_written" ... is setup's own; "user_args" is not in SETUP_KEYS on # purpose: carry_over keeps it setup.py:6167 ... "gpu", "gpus_asked", ..., "vision", "args_written"}) ``` The warning invites the user to delete them. `user_args` is where the user's own options are recorded — 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 (or `args_written`, which makes every current option look hand-added, `setup.py:6220`) can cost the user their settings on the next rewrite. Suggested fix: treat `user_args` and `args_written` as known internal keys in the settings-file validator (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 Monitor screen showed nothing for VRAM and the cache hit rate, while the engine log carries it, e.g.: ``` strata serve: decode expert cache hit rate: 67.5% (1903904 hits / 2821582 lookups); 500946 more read by the GPU over PCIe or from another GPU (15.1% of all 3322528 routed) strata serve: WARNING: only 253 MiB of VRAM free at the start of this request (below 1024 MiB): when the card is this full the driver can page GPU memory to system RAM, decode falls to a few tok/s and a window may never ... ``` Steps for a maintainer: 1. Load a model through the desktop app on Windows (default run config: no `api_monitor`, no `vram_elastic`). 2. Open the app's Monitor screen -> the VRAM / hit-rate tiles are empty. 3. `GET /api/requests` with the model's api key -> 404; `GET /v1/status` -> `"vram": {"elastic": false}`; `GET /metrics` -> `requests[0].hit_rate` and `engine.expert_slots` are both present. 4. Open the Expert-settings screen -> the two `user_args` / `args_written` warnings. ## Workaround in use today ```json "api_monitor": true, "vram_elastic": true, "vram_reserve_mib": 3072, "args": [..., "--vram-reserve-mib", "3072"] ``` Both new keys are read when the server starts (`server.py:8519`, `server.py:3120-3123`), so the model 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/requests` answers 200 with request timings, `/v1/status` reports `"vram": {"elastic": true}` and `POST /v1/vram` is 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. --- ## 繁體中文摘要(給使用者/維護者看的重點) 1. **監控畫面空白**:監控頁讀 `/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`。 2. **顯存那欄空白**:`/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` 加平鋪回退。 3. **`/v1/vram` 只有 POST**:監控若用 GET 去轮询会拿到 404,無法區分「不支援」與「沒資料」。 4. **专家设置的兩行警告是誤報**:`user_args` 與 `args_written` 是 Strata 自己的記錄鍵(`strata_control/user_args.py`、`setup.py:6164`),刪掉會丢掉你自己那些選項的記錄(交談快取 2 槽 4 GiB、`--spec 3` 等都在 `user_args` 裡)。 5. 你這台**沒有裝到舊版**:Control 0.1.49.2 是最新,Qwen 引擎最新就是 0.1.48(官方發布說明原文:every Qwen engine package stays as it was)。 6. **現在就能看的監控**:模型伺服器自帶的監控頁(英文,資料來源 `/metrics`)有全部資料 — 命中率 0.634、顯存 13.7 GiB(含 60 點歷史曲線)、專家快取 2456 槽 / 4.7 GiB。桌面 app 的中文磚位在 `strata-desktop.exe` 裡(字串是壓縮的,本機無法就地修改),所以那兩格要等官方修。 7. 附帶好處:`vram_elastic: true` 之後,顯存預留值可以用 `POST /v1/vram` **即時調整,不用重載模型**。
bsakaguchi 2026-11-04 01:53:55 +07:00
Author
Owner

@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:

  • Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes".

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

<!-- gh-comment-id:6396195434 --> @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: - [ ] Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other], then a short description. Example: "[Engine] decode stops after 2 minutes". 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](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md)
Author
Owner

@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.

<!-- gh-comment-id:6520965762 --> @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](https://github.com/Niko1221/Strata/blob/main/CONTRIBUTING.md).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Niko1221/Strata#1772
No description provided.