Record host memory and cgroup pressure independently of GPU sampling #1162

Merged
ghptc merged 1 commit from upstream-pr/1162 into main 2026-11-29 08:16:57 +00:00
ghptc commented 2026-11-28 14:36:01 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ghptc on 2026-11-28T14:36:01Z.


A GPU query can stall while a Wine service is reclaiming memory. When the same sampling loop collects both GPU and host data, the last successful GPU sample also becomes the last record of cgroup pressure or task exhaustion.

This adds a standalone Python sampler for a cgroup v2 service. Run it from a second terminal. It timestamps and flushes host available memory, host and cgroup PSI, memory usage and peak, swap, and memory and PID events. A pinned directory descriptor keeps samples associated with one unit instance through removal. A failed controller read leaves the other fields available. The Linux/Proton notes include the invocation.

Two regression tests pass with python3 -m unittest discover -v -s tests/linux. An additional user-service control with a 24 MiB high watermark, 96 MiB hard limit and zero swap produced one high event, zero max/OOM events and a 25,382,912-byte peak. The observer retained the event and recorded unit removal. The staged asset policy passed. The control uses only synthetic anonymous memory.

The Windows CI check stopped in Clippy at victory-shader/src/emit/mod.rs:2768 and victory-gpu/src/shadow.rs:1708. The base branch's CI job reports both diagnostics at the same lines. PR check · Base check

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5541210520 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1162). Originally posted by [ghptc](https://github.com/ghptc) on 2026-11-28T14:36:01Z. --- A GPU query can stall while a Wine service is reclaiming memory. When the same sampling loop collects both GPU and host data, the last successful GPU sample also becomes the last record of cgroup pressure or task exhaustion. This adds a standalone Python sampler for a cgroup v2 service. Run it from a second terminal. It timestamps and flushes host available memory, host and cgroup PSI, memory usage and peak, swap, and memory and PID events. A pinned directory descriptor keeps samples associated with one unit instance through removal. A failed controller read leaves the other fields available. The Linux/Proton notes include the invocation. Two regression tests pass with `python3 -m unittest discover -v -s tests/linux`. An additional user-service control with a 24 MiB high watermark, 96 MiB hard limit and zero swap produced one high event, zero max/OOM events and a 25,382,912-byte peak. The observer retained the event and recorded unit removal. The staged asset policy passed. The control uses only synthetic anonymous memory. The Windows CI check stopped in Clippy at victory-shader/src/emit/mod.rs:2768 and victory-gpu/src/shadow.rs:1708. The base branch's CI job reports both diagnostics at the same lines. [PR check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46155506307/job/141011147999) · [Base check](https://github.com/trustno1-coder/VIctory-NVIDIA/actions/runs/46154833762/job/141009085679)
Sign in to join this conversation.
No reviewers
No labels
No milestone
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.

Reference
trustno1-coder/VIctory-NVIDIA!1162
No description provided.