[PR #5306] [Engine] Keep concurrent Monitor progress and rates request-owned #5378

Open
opened 2026-11-07 16:34:46 +07:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Niko1221/Strata/pull/5306
Author: @shoucandanghehe
Created: 11/5/2026
Status: 🔄 Open

Base: main ← Head: upstream/monitor-request-metrics


📝 Commits (2)

  • 959ce82 Serving metrics: keep prompt progress and rates on their request
  • 1a3f2cf Serving tests: simplify concurrent Monitor regressions

📊 Changes

7 files changed (+188 additions, -30 deletions)

View changed files

📝 docs/DETAILS.md (+5 -0)
📝 serve/server.py (+44 -13)
📝 serve/test_ds_parallel.py (+36 -1)
📝 serve/test_parallel.py (+73 -1)
📝 serve/test_replicas.py (+26 -2)
📝 serve/test_stream_ownership.py (+1 -10)
📝 serve/web/app.js (+3 -3)

📄 Description

Problem

With concurrent requests, the Monitor can mix one request’s prompt length with another’s progress. A queued request can also clear the active reader’s progress.

When one request reads its prompt while another generates tokens, the Speed card can hide active decoding. The progress row also uses the aggregate rate as though it belonged to one request.

Fix

  • Keep prompt progress and prefill rate on their owning request.
  • Select an admitted reader rather than a newer waiter.
  • Show the selected request’s speed in its progress row and aggregate decode speed in the Speed card.

Related: #465.

Validation

Tested 1a3f2cf6 on Linux/WSL2, Python 3.14.4, using the real server with fake native-protocol producers.

python -m unittest -v \
  serve.test_parallel serve.test_parallel_yield serve.test_replicas serve.test_ds_parallel \
  serve.test_server.LiveRate serve.test_server.PromptProgress \
  serve.test_server.PromptProgressBatch serve.test_restart_waiters serve.test_stream_ownership

All 141 tests passed. Four regressions cover waiting requests, mixed prefill/decode, replicas and DeepSeek parallel requests; all four fail against the unpatched server.

Browser checks with the fake engine confirmed that two requests at 10 tok/s each show 10 tok/s for the selected request and 20 tok/s in the Speed card. Aggregate decode speed also remains visible during another request’s prefill.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Niko1221/Strata/pull/5306 **Author:** [@shoucandanghehe](https://github.com/shoucandanghehe) **Created:** 11/5/2026 **Status:** 🔄 Open **Base:** `main` ← **Head:** `upstream/monitor-request-metrics` --- ### 📝 Commits (2) - [`959ce82`](https://github.com/Niko1221/Strata/commit/959ce82ce74b2205088f958441182378f1b95b72) Serving metrics: keep prompt progress and rates on their request - [`1a3f2cf`](https://github.com/Niko1221/Strata/commit/1a3f2cf6bdebd969f014de204d05069a4b33b552) Serving tests: simplify concurrent Monitor regressions ### 📊 Changes **7 files changed** (+188 additions, -30 deletions) <details> <summary>View changed files</summary> 📝 `docs/DETAILS.md` (+5 -0) 📝 `serve/server.py` (+44 -13) 📝 `serve/test_ds_parallel.py` (+36 -1) 📝 `serve/test_parallel.py` (+73 -1) 📝 `serve/test_replicas.py` (+26 -2) 📝 `serve/test_stream_ownership.py` (+1 -10) 📝 `serve/web/app.js` (+3 -3) </details> ### 📄 Description ## Problem With concurrent requests, the Monitor can mix one request’s prompt length with another’s progress. A queued request can also clear the active reader’s progress. When one request reads its prompt while another generates tokens, the Speed card can hide active decoding. The progress row also uses the aggregate rate as though it belonged to one request. ## Fix - Keep prompt progress and prefill rate on their owning request. - Select an admitted reader rather than a newer waiter. - Show the selected request’s speed in its progress row and aggregate decode speed in the Speed card. Related: #465. ## Validation Tested `1a3f2cf6` on Linux/WSL2, Python 3.14.4, using the real server with fake native-protocol producers. ```sh python -m unittest -v \ serve.test_parallel serve.test_parallel_yield serve.test_replicas serve.test_ds_parallel \ serve.test_server.LiveRate serve.test_server.PromptProgress \ serve.test_server.PromptProgressBatch serve.test_restart_waiters serve.test_stream_ownership ``` All 141 tests passed. Four regressions cover waiting requests, mixed prefill/decode, replicas and DeepSeek parallel requests; all four fail against the unpatched server. Browser checks with the fake engine confirmed that two requests at 10 tok/s each show 10 tok/s for the selected request and 20 tok/s in the Speed card. Aggregate decode speed also remains visible during another request’s prefill. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
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#5378
No description provided.