[pr-diagnostics][memory] memory now: the PC's commit charge beside the process's private bytes #131

Manually merged
TrustNo1 merged 0 commits from nyutt/commit-charge-line into main 2026-12-04 02:13:56 +00:00 AGit
Contributor

Contributor role (optional)

  • Fluxer ID: —

What it changes

Nothing in the log said whether a PC needs its page file:

  • memory now:'s "committed" is the process's private bytes. They leave out the title's sections, and on NVIDIA they include the card's memory the driver maps into the process.
  • compile memory:'s "left to commit" (GlobalMemoryStatusEx) counts what an expandable page file can still grow to, not what is left now.

memory now: (once a second) now also gives the PC's commit charge, all programs together, from GetPerformanceInfo: the charge now, its limit, the most since Windows started, and how far the charge and the peak each pass the RAM. Example:

; the PC's commit charge 51438 MB of a limit of 53131 MB, against 31621 MB of RAM (19816 MB past the RAM; the most since Windows started 52859 MB, 21237 MB past the RAM)

One call a second, no lock, no switch. The doc comment records the measurements below.

How it was tested

  • Tested revision: commit 7f1d1b5 (this change on main 57dea7f) for the gates and tests. The game run used the same change on v2026.12.03.01 (bd0de0c), built as v2026.12.03.01-ram so that the shader cache stayed valid.
  • Commands and results, on 7f1d1b5:
    • cargo clippy --workspace --all-targets --locked -- -D warnings: clean.
    • cargo clippy --workspace --all-targets --all-features --locked -- -D warnings: clean.
    • cargo test --locked -p darner-gpu --lib commit_charge: 2 passed (a_charge_within_the_ram_says_so, what_passes_the_ram_is_named_now_and_at_its_peak).
    • cargo xtask policy --staged: ok.
    • cargo test --workspace --locked was not run in full.
  • Gameplay: RTX 5070 Ti 16 GB, 31.6 GB RAM, Windows 11, page files 4 GB fixed on C: + 16-48 GB on D:. Series X, 1440p, DLSS Quality, frame generation 2x, hardware ray tracing on, DARNER_PROCESS_MEMORY=1. One run of 15 minutes:
    • The line appeared every second.
    • Commit charge: 31,878 MB early in the start and 45,127 MB 23 s later, with the world loaded (the process's private bytes +13,296 MB, the card's use +10,255 MB). It reached 51,513 MB of a limit of 53,131 MB.
    • 2 s apart, compile memory: said "33476 MB left to commit" and this line said 51,438 MB charged of a 53,131 MB limit. Windows' \Memory\Committed Bytes counter agreed with this line (51,564 MB of 52,102 MB, read during the run).
    • The page files grew from 20,480 to 21,510 MB and held about 0.3 GB of data (Win32_PageFileUsage).
    • The run ended in a device removal (0x887A0005, no page fault) with the card at 15,158 MB of a 15,078 MB budget and hardware RT on. The memory walk had run 44 s earlier. An earlier run with the unmodified build (same PC, same day) also ended in a device removal, so I don't think this change caused it.
  • Before and after: not relevant (logging only).
  • Shader wave sizes: not relevant.
  • Coverage gaps: one PC (NVIDIA). Not run on AMD or Intel, nor under Proton (where GetPerformanceInfo reports what Wine gives).

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md.
  • I recorded this PR's dependencies below.
    • Depends on: none

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches.
  • Related PRs: none change the memory now: line. #59 and #62 cut the layer's own memory; #110 changes the compile memory floor (#70). This line gives them a figure to measure against.

This change was made with AI assistance (Claude Code).

🤖 Generated with Claude Code

## Contributor role (optional) - Fluxer ID: — ## What it changes Nothing in the log said whether a PC needs its page file: - `memory now:`'s "committed" is the process's private bytes. They leave out the title's sections, and on NVIDIA they include the card's memory the driver maps into the process. - `compile memory:`'s "left to commit" (`GlobalMemoryStatusEx`) counts what an expandable page file can still grow to, not what is left now. `memory now:` (once a second) now also gives the PC's commit charge, all programs together, from `GetPerformanceInfo`: the charge now, its limit, the most since Windows started, and how far the charge and the peak each pass the RAM. Example: `; the PC's commit charge 51438 MB of a limit of 53131 MB, against 31621 MB of RAM (19816 MB past the RAM; the most since Windows started 52859 MB, 21237 MB past the RAM)` One call a second, no lock, no switch. The doc comment records the measurements below. ## How it was tested - Tested revision: commit 7f1d1b5 (this change on `main` 57dea7f) for the gates and tests. The game run used the same change on v2026.12.03.01 (bd0de0c), built as `v2026.12.03.01-ram` so that the shader cache stayed valid. - Commands and results, on 7f1d1b5: - `cargo clippy --workspace --all-targets --locked -- -D warnings`: clean. - `cargo clippy --workspace --all-targets --all-features --locked -- -D warnings`: clean. - `cargo test --locked -p darner-gpu --lib commit_charge`: 2 passed (`a_charge_within_the_ram_says_so`, `what_passes_the_ram_is_named_now_and_at_its_peak`). - `cargo xtask policy --staged`: ok. - `cargo test --workspace --locked` was not run in full. - Gameplay: RTX 5070 Ti 16 GB, 31.6 GB RAM, Windows 11, page files 4 GB fixed on C: + 16-48 GB on D:. Series X, 1440p, DLSS Quality, frame generation 2x, hardware ray tracing on, `DARNER_PROCESS_MEMORY=1`. One run of 15 minutes: - The line appeared every second. - Commit charge: 31,878 MB early in the start and 45,127 MB 23 s later, with the world loaded (the process's private bytes +13,296 MB, the card's use +10,255 MB). It reached 51,513 MB of a limit of 53,131 MB. - 2 s apart, `compile memory:` said "33476 MB left to commit" and this line said 51,438 MB charged of a 53,131 MB limit. Windows' `\Memory\Committed Bytes` counter agreed with this line (51,564 MB of 52,102 MB, read during the run). - The page files grew from 20,480 to 21,510 MB and held about 0.3 GB of data (`Win32_PageFileUsage`). - The run ended in a device removal (0x887A0005, no page fault) with the card at 15,158 MB of a 15,078 MB budget and hardware RT on. The memory walk had run 44 s earlier. An earlier run with the unmodified build (same PC, same day) also ended in a device removal, so I don't think this change caused it. - Before and after: not relevant (logging only). - Shader wave sizes: not relevant. - Coverage gaps: one PC (NVIDIA). Not run on AMD or Intel, nor under Proton (where `GetPerformanceInfo` reports what Wine gives). ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md`. - [x] I recorded this PR's dependencies below. - Depends on: none ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. - Related PRs: none change the `memory now:` line. #59 and #62 cut the layer's own memory; #110 changes the compile memory floor (#70). This line gives them a figure to measure against. This change was made with AI assistance (Claude Code). 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The line's "committed" is the process's private bytes, and the compile
memory line's "left to commit" counts what an expandable page file can
still grow to: neither says whether a PC needs its page file. Each second
the line now also says the PC's commit charge, its limit, the most since
Windows started, and how far each passes the RAM (GetPerformanceInfo).

Co-Authored-By: Claude Opus 5.5 <[email protected]>
TrustNo1 manually merged commit ad701a0fda into main 2026-12-04 02:13:56 +00:00
Sign in to join this conversation.
No reviewers
No labels
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
TrustNo1/Darner!131
No description provided.