Skip to content

Opt in to sparse backing for large title physical pools on Windows - #2461

Open
dsh38 wants to merge 3 commits into
trustno1-coder:mainfrom
dsh38:native-large-physical-pools
Open

dsh38 wants to merge 3 commits into
trustno1-coder:mainfrom
dsh38:native-large-physical-pools

Conversation

@dsh38

@dsh38 dsh38 commented Nov 29, 2026

Copy link
Copy Markdown

What it changes

On native Windows, VICTORY_FILE_BACKED_PAGES=large lets title physical pools of at least 256 MiB use temporary sparse files in the configured physical-pages directory. Smaller pools keep their native GPU import eligibility. This uses the checked cache path, section lifetime and delete-on-close handling from #1226. Mapping a writable file view marks its slices as used so the low-heap arranger cannot move a slice whose contents have already been exposed. The existing Wine opt-in and the default native backing selection keep their prior behaviour.

How it was tested

  • Windows 11 Pro 26200, RTX 4080 SUPER 16 GB, driver 617.14, Ryzen 9 7950X3D, 64 GB RAM, fixed 4 GiB pagefile. Release based on 829188e9. Series X, 2560×1440 internal output, DLSS Performance, ray-tracing structure builder on, Ada 4× requested, 1920×1080 window. Restored the same save and pipeline cache for each run.
  • Kept VICTORY_DYNAMIC_SLOTS=393216 in both runs. The renderer reported a 1,000,000-entry host view heap. Measured Windows system commit above each run’s idle baseline 6–9 seconds after the first presented frame.
  • Before: +18.16 GiB, 11.08 GiB process private bytes. Our external harness closed the window at 5,440 MiB free commit (46 s including shutdown).
  • After, with only the large-pool opt-in: +11.38 GiB, 10.69 GiB process private bytes. Two files backed pools of 710 and 6,236 MiB. The house exterior and interior rendered. The same guard was eventually reached at 5,400 MiB (163 s). The 6.78 GiB reduction is in system commit at load. Renderer allocations can still grow later in play.
  • cargo build --locked --release -p victory passed. All 24 core library tests passed. All 46 active XMem tests passed serially, including the new writable-alias assertion and the existing file lifetime and DirectStorage tests. The full parallel HLE library run had two failures: the narrow command-line code-page test (also fails on stock on this PC) and a range-remapping timing test (passes serially). The staged asset-policy check passed.

Checked for overlap

@github-actions github-actions Bot added memory RAM or VRAM use, out of memory, leaks pr-fix Pull request: fixes a bug labels Nov 29, 2026
@github-actions github-actions Bot changed the title [pr-fix] [memory] Opt in to sparse backing for large title physical pools on Windows Opt in to sparse backing for large title physical pools on Windows Nov 29, 2026
@dsh38

dsh38 commented Nov 29, 2026

Copy link
Copy Markdown
Author

Follow-up on sustained play with the same RT-on Series X save, camera sequence and 393,216 slots. The stock host plus VICTORY_WINDOWS_BAR_MB=4096 alone hit the 5,500 MiB external commit guard after 58 s. On this branch, VICTORY_FILE_BACKED_PAGES=large, VICTORY_WINDOWS_BAR_MB=4096 and VICTORY_POOL_SMALL=1 completed the scheduled 420 s observation with 7,197 MiB minimum free system commit and a normal window close. System commit peaked at 60.15 GiB. During seconds 180–410 the game reported 3,200 source presents and 12,800 frames shown, with 14.0 median source FPS. The 4 KiB texture option was not tested independently here.

CI on this PR and on its unchanged base both stop at the same unused victory_loader::crash::unwind_copy in crash.rs:804. Base check · PR check.

moritz-eckhard-nickel added a commit to moritz-eckhard-nickel/VIctory-NVIDIA that referenced this pull request Nov 30, 2026
…arge title physical pools on Windows)

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@john-9474 john-9474 mentioned this pull request Nov 30, 2026
1 task done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

memory RAM or VRAM use, out of memory, leaks pr-fix Pull request: fixes a bug

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant