Add an ignored measurement of snapshot commit per declared range #4515

Closed
github-bot wants to merge 14 commits from github-bot/gh-4514 into main AGit
Owner

@⁠Kerimrode on GitHub · 2026-11-30 21:42 UTC · original
Kerimrode:measure-snapshot-commit → main · +1002 −847 · 32 files · 14 commits · closed without merging

What it changes

Adds one #[ignore]d test, snapshot_commit_per_declared_byte, in shadow.rs. It asserts nothing and changes no runtime code. It builds an unbacked Shadow of 256 MiB, declares a 1 MiB range with Shadow::writing, and prints the process working set and committed bytes (procmem::process_memory) before and after, then again for a second range far from the first.

Run alone, on Windows:

cargo test -p victory-gpu --lib snapshot_commit -- --ignored --nocapture --test-threads=1

What it shows

On Windows 11, debug build, defaults (wide_back: true, relay: false):

copy of 256 MiB, 1 MiB declared per range
first range:  working set +0.5 MiB, committed +256.8 MiB
second range: working set +0.0 MiB, committed +0.0 MiB

So the snapshot (pooled(total)) is committed at the length of the whole copy, not of the declared range, while almost none of it is resident. The second range adds nothing: the snapshot is per copy.

What it does not show

How much this matters for a real title. That depends on how big the declared ranges are against their copies, and I have no title to run. The snapshot pool reuses buffers, which may soften it. I am not proposing a change to the allocation here, only a number anyone can reproduce, since commit (not RAM) is what docs/windows-memory.md reports as the limit being hit.

How it was tested

  • cargo clippy -p victory-gpu --all-targets [--all-features] --locked -- -D warnings: clean
  • cargo xtask policy --staged: ok
**@⁠Kerimrode** on GitHub · 2026-11-30 21:42 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4514) `Kerimrode:measure-snapshot-commit` → `main` · +1002 −847 · 32 files · 14 commits · closed without merging ## What it changes Adds one `#[ignore]`d test, `snapshot_commit_per_declared_byte`, in `shadow.rs`. It asserts nothing and changes no runtime code. It builds an unbacked `Shadow` of 256 MiB, declares a 1 MiB range with `Shadow::writing`, and prints the process working set and committed bytes (`procmem::process_memory`) before and after, then again for a second range far from the first. Run alone, on Windows: cargo test -p victory-gpu --lib snapshot_commit -- --ignored --nocapture --test-threads=1 ## What it shows On Windows 11, debug build, defaults (wide_back: true, relay: false): copy of 256 MiB, 1 MiB declared per range first range: working set +0.5 MiB, committed +256.8 MiB second range: working set +0.0 MiB, committed +0.0 MiB So the snapshot (`pooled(total)`) is committed at the length of the whole copy, not of the declared range, while almost none of it is resident. The second range adds nothing: the snapshot is per copy. ## What it does not show How much this matters for a real title. That depends on how big the declared ranges are against their copies, and I have no title to run. The snapshot pool reuses buffers, which may soften it. I am not proposing a change to the allocation here, only a number anyone can reproduce, since commit (not RAM) is what docs/windows-memory.md reports as the limit being hit. ## How it was tested - `cargo clippy -p victory-gpu --all-targets [--all-features] --locked -- -D warnings`: clean - `cargo xtask policy --staged`: ok
Shadow::writing takes a snapshot the length of the whole copy for any declared range. The test prints working set and committed bytes for a 256 MiB copy with 1 MiB declared. It is #[ignore]d and asserts nothing.

Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 21:46:11 +00:00
github-bot closed this pull request 2026-12-01 18:43:13 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:39 UTC · original

Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

**@⁠trustno1-coder** on GitHub · 2026-12-01 18:39 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4514#issuecomment-7321279036) Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.

Pull request closed

This discussion has been locked. Commenting is limited to contributors.
No reviewers
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.

Dependencies

No dependencies set

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