Compile-memory estimator learns from unavailable PrivateUsage on Proton #2408

Open
opened 2026-11-29 12:49:01 +00:00 by ArturoWolff · 1 comment
ArturoWolff commented 2026-11-29 12:49:01 +00:00 (Migrated from github.com)
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by ArturoWolff on 2026-11-29T12:49:01Z.


Expected / actual behaviour

On experimental Proton, the production compile-memory estimator can train itself on a private-memory field that Wine did not return. This is a separate correctness issue from the memory-pressure/wait regressions: the absence of a measurement must not count as a measured zero-byte compile.

Tested base: 829188e969ffd2907e5867c5d9aca29bd91cb1b6, Windows MSVC x64 target built with the pinned Rust 1.98.1 toolchain using locked dependencies. Runtime: GE-Proton 11-14 on Garuda Linux (Ryzen 5 5600, RTX 4060 / 8 GB, 16 GB RAM, NVIDIA 620.73.04). The ABI and estimator tests are CPU-only and do not require a title or GPU. Windows remains the project's primary platform; this is a Proton compatibility observation, not a claim of a native Windows regression.

Credit ghptc's merged #1182 for identifying the short counter response in the memory example. I reproduced it independently at the production consumer, as discussed in #2148. #1182 corrected the example, not the compile estimator.

Reproduction and root cause

On this runtime, five self-process API observations all returned success for an 80-byte PROCESS_MEMORY_COUNTERS_EX request, but returned cb=72 and left the PrivateUsage sentinel untouched. A separate owned 32 MiB allocation control confirmed that the basic PagefileUsage counter did not increase on commit, increased by 32 MiB on touch, and decreased by 32 MiB on release. I would not substitute it for private commit based on this observation.

At the tested base, process_memory tests only the success flag before consuming the zero-initialised trailing field. The interval accounting records the resulting zero delta; the estimator trusts it after four samples.

A test-only regression exercised the actual reader, State and Estimator, with synthetic admission figures and four CPU-only start/sample/finish cycles. All 12 adjacent ABI observations confirmed the same unavailable field. The original reader recorded four zero-cost intervals. The assertion expecting the 1 GiB first guess to remain failed. A separate candidate checks success, returned width and the written fields, represents unavailable observations explicitly, and excludes incomplete measurement intervals without changing admission floors or the estimator's arithmetic.

Focused observation Original production reader Corrected reader
Adjacent ABI observations with private counter unavailable 12/12 12/12
Completed test intervals 4 4
Learned samples 4 0
Final estimate (bytes) 268435456 1073741824
Estimator regression child exit 101 (expected RED) 0

The raw counter control passed in both revisions. The corrected Windows-target compilemem suite passed 21 tests under GE-Proton (0 failed, 0 ignored); coverage includes genuine zero, truncated/unwritten fields, missing start/sample/finish observations, overlap accounting and permit retirement. A native Windows run and full repository CI are still outstanding.

Real renderer corroboration, not a speedup claim

I also ran a separate normal release-build comparison with the same ordinary starting profile, empty application/driver caches and all 54 effective non-menu settings matched (Series X, 1080-to-1440 mode, DLSS/FG off, RT requested, full write-back and no additional pass exclusions). The actual output remained 2560x1440. The candidate changes only compilemem.rs.

Observation Stock cold Corrected cold
Periodic compile-memory records 31 38
Private counter reported 0 MiB unavailable
Last logged learned count 377 0
Estimate (MiB) 256 1024
Maximum simultaneous compiles observed 11 7
Missing RT builder stages 34/53 41/53
Title exit 3 3

Both runs reached an incorrectly rendered opening cinematic, not a controllable world. Different starting RAM headroom, elapsed time and frame workloads prevent a causal throughput or FPS claim. Both retained an independent 128 MiB host-memory stop; neither hit it or logged a kernel OOM/GPU fault. The correction has not been deployed in our default build.

This is also distinct from #2392's system commit-growth issue. All 7 stock-cold, 7 stock-warm and 8 corrected-cold logged deferral records named the physical-memory soft floor, with at least 30,037 MiB of commit left in those samples. These are sampled/capped log records, not a count of all individual refusals. No guard relaxation is proposed.

Working on a correction

Yes. Preserve measured zero as valid, keep unavailable distinct, and retain the normal permit retirement/retry/floor behaviour. The focused correction and actual cold test are complete; broader test precision and native Windows/CI qualification are still open. Reporting the specific production defect here so that it can be tracked separately from the RT preparation and wait-loop work. No raw title logs, game bytes, or screenshots are included.

Log excerpts (CPU-only reproducer and renderer corroboration)

The primary reproducer is a standalone test of the production reader/estimator. Consequently it generates a test-console log, not title play/crash logs. Relevant verbatim lines from the actual test consoles:

Original, test-only regression:
compilemem estimate available=0 observations=12 samples=4 mean=0 peak=0 expected=268435456 first_guess=1073741824
assertion `left == right` failed: unavailable private counters must not lower the first guess
test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 973 filtered out; finished in 0.00s

Corrected production reader and accounting:
compilemem estimate available=0 observations=12 samples=0 mean=0 peak=0 expected=1073741824 first_guess=1073741824 finished=4 running=0 biggest=0
test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 982 filtered out; finished in 0.00s

For the separate actual renderer comparison, these are the last periodic observations from each run, excerpted before the trailing per-key list (omitted to keep only aggregate diagnostics):

2026-11-29T09:48:33.088102Z  INFO victory_gpu::compilemem: compile memory: process 0 MB private, 12828 MB in memory; the PC has 532 MB free and 30152 MB left to commit; buffer mirror span 1490 MB, texture staging 24 MB; compiles: 1 running (most at once 11), 378 started, 377 finished, 413 waited to start (877847 ms in all), 98 put off after waiting; one is expected to take 256 MB (first guess 1024 MB; learned from 377: the mean 0 MB, the biggest lately 0 MB); [remainder omitted]
2026-11-29T11:51:12.350689Z  INFO victory_gpu::compilemem: compile memory: process unavailable private, 13897 MB in memory; the PC has 374 MB free and 32510 MB left to commit; buffer mirror span 1438 MB, texture staging 30 MB; compiles: 1 running (most at once 7), 550 started, 549 finished, 648 waited to start (1199615 ms in all), 156 put off after waiting; one is expected to take 1024 MB (first guess 1024 MB; learned from 0: the mean unavailable, the biggest lately unavailable); [remainder omitted]

These are not simultaneous observations or matched workload rates. The working-set column is not private commit. The reproducible defect is the estimator assertion above, not a claim that all title failures have the same cause. Full raw title logs and asset-derived material remain private.

AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:6678897848 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2408). Originally posted by [ArturoWolff](https://github.com/ArturoWolff) on 2026-11-29T12:49:01Z. --- ## Expected / actual behaviour On experimental Proton, the production compile-memory estimator can train itself on a private-memory field that Wine did not return. This is a separate correctness issue from the memory-pressure/wait regressions: the absence of a measurement must not count as a measured zero-byte compile. **Tested base:** `829188e969ffd2907e5867c5d9aca29bd91cb1b6`, Windows MSVC x64 target built with the pinned Rust 1.98.1 toolchain using locked dependencies. Runtime: GE-Proton 11-14 on Garuda Linux (Ryzen 5 5600, RTX 4060 / 8 GB, 16 GB RAM, NVIDIA 620.73.04). The ABI and estimator tests are CPU-only and do not require a title or GPU. Windows remains the project's primary platform; this is a Proton compatibility observation, not a claim of a native Windows regression. Credit ghptc's merged [#1182](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/1182) for identifying the short counter response in the memory example. I reproduced it independently at the production consumer, as discussed in [#2148](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2148#issuecomment-7254818687). #1182 corrected the example, not the compile estimator. ## Reproduction and root cause On this runtime, five self-process API observations all returned success for an 80-byte `PROCESS_MEMORY_COUNTERS_EX` request, but returned `cb=72` and left the `PrivateUsage` sentinel untouched. A separate owned 32 MiB allocation control confirmed that the basic `PagefileUsage` counter did not increase on commit, increased by 32 MiB on touch, and decreased by 32 MiB on release. I would not substitute it for private commit based on this observation. At the tested base, [`process_memory`](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/829188e969ffd2907e5867c5d9aca29bd91cb1b6/crates/victory-gpu/src/compilemem.rs#L287-L303) tests only the success flag before consuming the zero-initialised trailing field. The [interval accounting](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/829188e969ffd2907e5867c5d9aca29bd91cb1b6/crates/victory-gpu/src/compilemem.rs#L146-L201) records the resulting zero delta; [the estimator](https://github.com/trustno1-coder/VIctory-NVIDIA/blob/829188e969ffd2907e5867c5d9aca29bd91cb1b6/crates/victory-gpu/src/compilemem.rs#L89-L104) trusts it after four samples. A test-only regression exercised the actual reader, State and Estimator, with synthetic admission figures and four CPU-only start/sample/finish cycles. All 12 adjacent ABI observations confirmed the same unavailable field. The original reader recorded four zero-cost intervals. The assertion expecting the 1 GiB first guess to remain failed. A separate candidate checks success, returned width and the written fields, represents unavailable observations explicitly, and excludes incomplete measurement intervals without changing admission floors or the estimator's arithmetic. | Focused observation | Original production reader | Corrected reader | |---|---:|---:| | Adjacent ABI observations with private counter unavailable | 12/12 | 12/12 | | Completed test intervals | 4 | 4 | | Learned samples | 4 | 0 | | Final estimate (bytes) | 268435456 | 1073741824 | | Estimator regression child exit | 101 (expected RED) | 0 | The raw counter control passed in both revisions. The corrected Windows-target compilemem suite passed 21 tests under GE-Proton (0 failed, 0 ignored); coverage includes genuine zero, truncated/unwritten fields, missing start/sample/finish observations, overlap accounting and permit retirement. A native Windows run and full repository CI are still outstanding. ## Real renderer corroboration, not a speedup claim I also ran a separate normal release-build comparison with the same ordinary starting profile, empty application/driver caches and all 54 effective non-menu settings matched (Series X, 1080-to-1440 mode, DLSS/FG off, RT requested, full write-back and no additional pass exclusions). The actual output remained 2560x1440. The candidate changes only `compilemem.rs`. | Observation | Stock cold | Corrected cold | |---|---:|---:| | Periodic compile-memory records | 31 | 38 | | Private counter reported | 0 MiB | unavailable | | Last logged learned count | 377 | 0 | | Estimate (MiB) | 256 | 1024 | | Maximum simultaneous compiles observed | 11 | 7 | | Missing RT builder stages | 34/53 | 41/53 | | Title exit | 3 | 3 | Both runs reached an incorrectly rendered opening cinematic, not a controllable world. Different starting RAM headroom, elapsed time and frame workloads prevent a causal throughput or FPS claim. Both retained an independent 128 MiB host-memory stop; neither hit it or logged a kernel OOM/GPU fault. The correction has not been deployed in our default build. This is also distinct from [#2392](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/2392)'s system commit-growth issue. All 7 stock-cold, 7 stock-warm and 8 corrected-cold **logged deferral records** named the physical-memory soft floor, with at least 30,037 MiB of commit left in those samples. These are sampled/capped log records, not a count of all individual refusals. No guard relaxation is proposed. ## Working on a correction Yes. Preserve measured zero as valid, keep unavailable distinct, and retain the normal permit retirement/retry/floor behaviour. The focused correction and actual cold test are complete; broader test precision and native Windows/CI qualification are still open. Reporting the specific production defect here so that it can be tracked separately from the RT preparation and wait-loop work. No raw title logs, game bytes, or screenshots are included. ## Log excerpts (CPU-only reproducer and renderer corroboration) The primary reproducer is a standalone test of the production reader/estimator. Consequently it generates a test-console log, not title play/crash logs. Relevant verbatim lines from the actual test consoles: ```text Original, test-only regression: compilemem estimate available=0 observations=12 samples=4 mean=0 peak=0 expected=268435456 first_guess=1073741824 assertion `left == right` failed: unavailable private counters must not lower the first guess test result: FAILED. 0 passed; 1 failed; 0 ignored; 0 measured; 973 filtered out; finished in 0.00s Corrected production reader and accounting: compilemem estimate available=0 observations=12 samples=0 mean=0 peak=0 expected=1073741824 first_guess=1073741824 finished=4 running=0 biggest=0 test result: ok. 1 passed; 0 failed; 0 ignored; 0 measured; 982 filtered out; finished in 0.00s ``` For the separate actual renderer comparison, these are the last periodic observations from each run, excerpted before the trailing per-key list (omitted to keep only aggregate diagnostics): ```text 2026-11-29T09:48:33.088102Z INFO victory_gpu::compilemem: compile memory: process 0 MB private, 12828 MB in memory; the PC has 532 MB free and 30152 MB left to commit; buffer mirror span 1490 MB, texture staging 24 MB; compiles: 1 running (most at once 11), 378 started, 377 finished, 413 waited to start (877847 ms in all), 98 put off after waiting; one is expected to take 256 MB (first guess 1024 MB; learned from 377: the mean 0 MB, the biggest lately 0 MB); [remainder omitted] 2026-11-29T11:51:12.350689Z INFO victory_gpu::compilemem: compile memory: process unavailable private, 13897 MB in memory; the PC has 374 MB free and 32510 MB left to commit; buffer mirror span 1438 MB, texture staging 30 MB; compiles: 1 running (most at once 7), 550 started, 549 finished, 648 waited to start (1199615 ms in all), 156 put off after waiting; one is expected to take 1024 MB (first guess 1024 MB; learned from 0: the mean unavailable, the biggest lately unavailable); [remainder omitted] ``` These are not simultaneous observations or matched workload rates. The working-set column is not private commit. The reproducible defect is the estimator assertion above, not a claim that all title failures have the same cause. Full raw title logs and asset-derived material remain private. AI assistance: Hermes Agent, working on behalf of ArturoWolff. (GPT 6.2 Sol High).
github-actions[bot] commented 2026-11-29 12:49:11 +00:00 (Migrated from github.com)
Author
Contributor

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by github-actions[bot] on 2026-11-29T12:49:11Z.


Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7256085845 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/2408#issuecomment-7256085845). Originally posted by [github-actions[bot]](https://github.com/apps/github-actions) on 2026-11-29T12:49:11Z. --- Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Sign in to join this conversation.
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#2408
No description provided.