mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #2890] [CLOSED] serve: the Monitor shows the control-line wait a batch request is in #4316
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#4316
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?
📋 Pull Request Information
Original PR: https://github.com/Niko1221/Strata/pull/2890
Author: @dsj027-collab
Created: 10/17/2026
Status: ❌ Closed
Base:
main← Head:monitor-control-line-wait📝 Commits (1)
73bc489serve: the Monitor shows the control-line wait a batch request is in📊 Changes
4 files changed (+178 additions, -3 deletions)
View changed files
📝
serve/server.py(+16 -0)➕
serve/test_monitor_waiting.py(+153 -0)📝
serve/web/app.js(+8 -2)📝
serve/web/monitor.html(+1 -1)📄 Description
What this changes
With
--batch, the server's fifo is no longer where requests queue: each one is registered as running the moment it arrives, and the queue it really waits in is the engine's control lines - one prompt read at a time, behind whatever read is in progress (_take_control). The Monitor could not show that anywhere:queued->generatingin the same second andqueue_sstayed0.000, so a request that waited 55 s for the next read looked identical to one that started reading at once;N queued, which with--batchis always 0 while a real queue is standing on the lines._take_controlnow marks the request's own monitor recordwaitingwhile it is in the queue andreadingwhen it takes the lines, and adds the seconds it spent waiting to that record'squeue_s- the field the server's fifo wait already writes, so on--batch 1and--batch Nalike the row shows the whole time before work started. The request list and the pill render the two new states (N waiting to readbesideN queued);/metricshas carriedlive.waiting/live.admittingfor a while now, this only draws them.What it leaves alone
No scheduling change and no output change: the default path is byte-identical. Nothing is marked when
api_monitoris off (the default) - there is no record to mark - and thewaitingcounter,wait_lensandSTRATA_ADMIT_SHORT_FIRSTadmission order are untouched (a test asserts they still balance).How I checked
serve/test_monitor_waiting.py(new, 5 tests): the stubbed-engine pattern ofserve/test_admit_order.py- no process, no GPU. Covers: free lines land onreadingwith a sub-secondqueue_s; held lines showwaitingwith nothing counted, thenreadingwith the wait added; a cancelled wait never claimsreading, keepsqueue_sat 0, and leaveswaiting/wait_lensbalanced; no record on the thread is inert; the fifo's wait and the lines' wait add up in one field.serve.test_admit_order+serve.test_slot_alloc(11 tests) andserve.test_server(337 tests) pass unchanged.--batch 2, engine 0.1.45): 2 x 120K-token requests plus 8 short ones at once - the list showedwaitingrows withqueue_s54-58 s for the slot-bound requests and 0.9 s for the oneSTRATA_ADMIT_SHORT_FIRSTlet through, matching/metricslive.waiting(peak 8) sampled at 0.5 s. Not tested: Windows (the change is OS-independent Python + the web app), HIP/SYCL (no engine code touched).Follow-up to #2109 (its scheduling half shipped as
STRATA_ADMIT_SHORT_FIRSTin 0.1.45; this is the visibility half), and adjacent to #2857/#2858 (per-slot widgets).🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.