mirror of
https://github.com/Niko1221/Strata.git
synced 2026-12-03 19:03:30 +07:00
[PR #4713] [GUI] Monitor: an impossible PCIe traffic reading is no reading #5145
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#5145
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/4713
Author: @ruibeikaa
Created: 10/30/2026
Status: 🔄 Open
Base:
main← Head:monitor-pcie-wrap📝 Commits (3)
85e3b12[GUI] Monitor: an impossible PCIe traffic reading is no readingb6b1af4[GUI] Monitor: the desktop app drops the same impossible PCIe readings9c312ce[GUI] Monitor: a wrapped PCIe counter is read again before it is dropped📊 Changes
4 files changed (+45 additions, -5 deletions)
View changed files
📝
apps/host/server/device-probes.mjs(+3 -1)📝
apps/host/tests/monitor-dashboard.test.mjs(+2 -0)📝
serve/telemetry.py(+11 -4)📝
serve/test_server.py(+29 -0)📄 Description
Problem and result
On a GP100 the Monitor shows PCIe traffic no link can carry. About one read in six of
nvmlDeviceGetPcieThroughputcomes back just under 200 GiB/s, even on an idle card. The web Monitor passes that on and the server adds the cards up, so with four dies the tile jumps between about 0 and 204,800 or 409,600 MB/s, and the spike sets the sparkline's scale. The desktop app has the same problem on its own path: while a model runs it readsnvidia-smi dmon, which prints the same numbers.With this change the web Monitor reads a wrapped counter again, so the impossible values go and no second loses its reading. Its sampler went from 33 of 60 impossible values to 0 of 60, with none missing. The desktop app drops the value instead: real
dmonoutput went from 8 of 96 impossible values to 0 of 96.Related discussion
none. #2272 (closed, not merged) worked on the same tile, for cards with no traffic counter, and left NVML's numbers alone.
Approach
The bad values sit below 209,715,200 KB/s, which is 2^22 KB in NVML's documented 20 ms window: a few MB/s below it at idle, up to 6.4 GB/s below it with a request running. That reads like the counter stepping back and wrapping. This is my inference from the numbers, not something from NVIDIA.
The wrap does not last. Reading again at once gave a possible value 420 times out of 420, so
_Nvmlinserve/telemetry.pyreads once more when a value is above 150 GiB/s, and treats it as unreadable only if the second read is above it too. It is the same call on the same counter, about 30 ms later, in the sampler's thread. 150 GiB/s is above PCIe 6.0 x16 (under 120 GiB/s) and far from the wrap point. Readings below it are unchanged.parsePcieThroughputinapps/host/server/device-probes.mjsonly sees onedmonoutput, so it drops the value. The AMD and Mac readers are not touched, and no engine code changes.Validation
Main
870aedd9eagainst this branch, Windows 11, driver 581.80, 2x PH402 SKU 200 (four GP100 dies) and 2x RTX 3090 Ti, with a model loaded on the GP100s.Passed:
_Nvml(i).read(), 240 rounds, rx and tx. Main, idle: 334 of 1,920 values impossible on the GP100s, peak 204,800 MB/s, and 0 of 960 on the RTX 3090 Ti. This branch, with a request running on the GP100s: 0 impossible and 0Noneon both.Telemetry(gpu_indices=[2, 3, 4, 5]), 30 s, the summed rx and tx. Main, idle: 33 of 60 impossible, peak 409,598 MB/s. This branch, with a request running: 0 of 60, 0None, peak 1,586 MB/s.Telemetry(gpu_index=2), one die alone, 30 s: 0Nonein 28 points._pcie_mbon an older local serve tree, read from the Monitor's data and the page: 0 to 0.3 MB/s idle, then a median of 199 and a peak of 4,275 MB/s while reading a 200K-token prompt, with no impossible value and no gap.parsePcieThroughputon realnvidia-smi dmon -i 2,3,4,5 -s t -c 1output, 24 rounds, four dies: 8 of 96 impossible with a peak of 209,673 MB/s on main; on this branch 0 impossible, 18 dropped, highest kept 38 MB/s.python -m unittest serve.test_server serve.test_monitor serve.test_prometheuson this head, Python 3.13.5: 378 tests, OK, 3 skipped.node --testonmonitor-dashboard,monitor-host-sensors,native-monitor-projectionandsensor-paceinapps/host, Node 22.22.3: 30 tests pass, on the commit before this head; this head only changesserve/. I copied in esbuild 0.28.1 for this, where the lockfile has 0.25.12.NvmlPcieTrafficagainst the reader without the re-read, and the newparsePcieThroughputassertions against main's parser.Failed: none observed.
Not run:
apps/hostsuite: its dependencies are not installed here.Limits
dmonrounds above, 12 lost at least one die.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.