[GH-ISSUE #2857] [Feature]: Monitor: one widget per batch slot, so several requests at once each show their own speed #1150

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

Originally created by @street-tripy on GitHub (Oct 17, 2026).
Original GitHub issue: https://github.com/Niko1221/Strata/issues/2857

When "parallel": N is set, I want to see at a glance that the requests are really decoding
together, each with its own rate — and which slot is reading, decoding or free.

Today the Monitor only shows one request's number: the header pill reads Generating · 79.8 tok/s (the newest request) and the Model state card shows one request's progress and rate. With
two coding agents running I cannot tell from the page whether they are interleaved or one after
the other, so I end up watching the engine log's strata batch: ... avg 2.00 rows, ... ms/window
line instead — which is a strange thing to have to do to answer "is it busy?".

What I would like: one widget per batch slot in the Monitor — Worker 1, Worker 2, … — each
with the slot's state (Reading / Decoding / Free), its own live tok/s, how many tokens it has
written and how long it has been in the slot, and that slot's context fill. The header pill
would name every decoding stream when more than one is decoding (2 decoding · 80.4 + 76.1 tok/s).

Workaround I use today: curl /metrics and read live.slots by hand, or the engine log. The
data is already there — live.slots has carried slot, state, prompt_tokens, generated,
elapsed_s and tok_s per slot since #465; the page simply does not show it.

It should stay out of the way for everyone else: the card only appears when /metrics reports
live.parallel, i.e. when the run config sets "parallel": N. Without it the Monitor is
exactly what it is today.

I have a patch ready for this (4 files, 98 insertions: index.html, app.js, app.css, plus
the same page test as test_the_card_is_on_the_page in test_monitor.py) and will open a PR
against it if that is welcome.

Originally created by @street-tripy on GitHub (Oct 17, 2026). Original GitHub issue: https://github.com/Niko1221/Strata/issues/2857 When `"parallel": N` is set, I want to see at a glance that the requests are really decoding *together*, each with its own rate — and which slot is reading, decoding or free. Today the Monitor only shows one request's number: the header pill reads `Generating · 79.8 tok/s` (the newest request) and the Model state card shows one request's progress and rate. With two coding agents running I cannot tell from the page whether they are interleaved or one after the other, so I end up watching the engine log's `strata batch: ... avg 2.00 rows, ... ms/window` line instead — which is a strange thing to have to do to answer "is it busy?". What I would like: one widget per batch slot in the Monitor — `Worker 1`, `Worker 2`, … — each with the slot's state (Reading / Decoding / Free), its own live tok/s, how many tokens it has written and how long it has been in the slot, and that slot's context fill. The header pill would name every decoding stream when more than one is decoding (`2 decoding · 80.4 + 76.1 tok/s`). Workaround I use today: `curl /metrics` and read `live.slots` by hand, or the engine log. The data is already there — `live.slots` has carried `slot`, `state`, `prompt_tokens`, `generated`, `elapsed_s` and `tok_s` per slot since #465; the page simply does not show it. It should stay out of the way for everyone else: the card only appears when `/metrics` reports `live.parallel`, i.e. when the run config sets `"parallel": N`. Without it the Monitor is exactly what it is today. I have a patch ready for this (4 files, 98 insertions: `index.html`, `app.js`, `app.css`, plus the same page test as `test_the_card_is_on_the_page` in `test_monitor.py`) and will open a PR against it if that is welcome.
Author
Owner

@street-tripy commented on GitHub (Oct 17, 2026):

How it looks running two agents on one 4090

Three states of the card, same machine, "parallel": 2:

The Workers card, rows per slot

The Workers card, reading state

The Workers card, queue row active

Each slot is a row that stretches the card, stacked in slot order — name, state, its own tok/s, what it has written, its context fill and the bar under it. The top row is the queue row: requests in flight outside a slot, and anything waiting for one.

The two numbers that needed care:

  • Per-slot tok/s is a window rate, not the mean since the first token. The published live.slots[].tok_s is generated / (now - first_token), so a slot opens at ~300 t/s and spends the next minute decaying to 35. The widget now mirrors the server's own window rule (RATE_WINDOW_S = 2.0, RATE_MIN_SPAN_S = 0.25, server.py:220-221) over consecutive samples, so it reads 35.0 from the start.
  • A slot that is reading shows the engine's prefill rate — the Speed card's right-hand number. It is available in the batch path after all: the slot reader delegates to _control() (server.py:1704), and _control parses the engine's PP progress lines and sets engine.prefill_tok_s_mean (server.py:1283-1288). One engine-wide figure, belonging to the slot that is reading, which is the only one — prompts are admitted one at a time. The cached prefix is not read, so it is the rate over the new tail tokens.

Implemented in #2858. Screenshots are on my fork's docs/workers-card-screenshots branch, so they stay out of the PR diff.

<!-- gh-comment-id:6233098077 --> @street-tripy commented on GitHub (Oct 17, 2026): ## How it looks running two agents on one 4090 Three states of the card, same machine, `"parallel": 2`: ![The Workers card, rows per slot](https://github.com/street-tripy/Strata/raw/docs/workers-card-screenshots/screenshots/workers-card-1.png) ![The Workers card, reading state](https://github.com/street-tripy/Strata/raw/docs/workers-card-screenshots/screenshots/workers-card-2.png) ![The Workers card, queue row active](https://github.com/street-tripy/Strata/raw/docs/workers-card-screenshots/screenshots/workers-card-3.png) Each slot is a row that stretches the card, stacked in slot order — name, state, **its own tok/s**, what it has written, its context fill and the bar under it. The top row is the queue row: requests in flight outside a slot, and anything waiting for one. The two numbers that needed care: - **Per-slot tok/s is a window rate, not the mean since the first token.** The published `live.slots[].tok_s` is `generated / (now - first_token)`, so a slot opens at ~300 t/s and spends the next minute decaying to 35. The widget now mirrors the server's own window rule (`RATE_WINDOW_S = 2.0`, `RATE_MIN_SPAN_S = 0.25`, server.py:220-221) over consecutive samples, so it reads 35.0 from the start. - **A slot that is reading shows the engine's prefill rate** — the Speed card's right-hand number. It is available in the batch path after all: the slot reader delegates to `_control()` (server.py:1704), and `_control` parses the engine's `PP` progress lines and sets `engine.prefill_tok_s_mean` (server.py:1283-1288). One engine-wide figure, belonging to the slot that is reading, which is the only one — prompts are admitted one at a time. The cached prefix is not read, so it is the rate over the new tail tokens. Implemented in #2858. Screenshots are on my fork's `docs/workers-card-screenshots` branch, so they stay out of the PR diff.
Author
Owner

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

  1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see.
  2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other].
  3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system.
  4. Comment /reopen. A check runs and either reopens the issue or lists what is still missing.

The rules are in CONTRIBUTING.md.

<!-- gh-comment-id:6271318377 --> @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: 1. Re-test on 0.2.0-beta. It may already be fixed. Write down what you see. 2. Start the title with its area: [Engine], [GUI], [TUI], [Benchmark], [Docs] or [Other]. 3. Fill in the parts of the issue form: what happened, the Strata version, your graphics card, memory and system. 4. Comment `/reopen`. A check runs and either reopens the issue or lists what is still missing. The rules are in [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#1150
No description provided.