victory play: warn at the start when a PC of at most 40 GB has under 20 GB of RAM free #4192

Closed
github-bot wants to merge 11 commits from github-bot/gh-4191 into main AGit
Owner

@⁠RustyTheDalek on GitHub · 2026-11-30 17:16 UTC · original
RustyTheDalek:feat/low-free-ram-warning → main · +834 −824 · 33 files · 11 commits · closed without merging

What it changes

victory play already warns when RAM and page file together are under 52 GB (memory_warning). It does not look at how much RAM is free when the game starts, and on a 32 GB PC that decides how long the game plays before Windows starts paging it.

On a Radeon RX 9070 XT with 32 GB of RAM and an 18 GB page file (so no memory_warning), the process held 25-26 GB private once in the world, 9-10 GB of it the PC's memory shared with the card:

Play log RAM free at the start What happened
2026-11-29 about 21 GB 15-25 fps for 5 to 20 minutes, then frames of 5 s
2026-11-30 13:04 about 17 GB (other programs open) 0.1-0.3 fps a minute into the world: frames of 5 to 9 s with the card 1 % busy, about 6.5 GB of the process in the page file

With nothing else changed the second start just had less room. So victory play now says so before the start, on a PC of at most 40 GB of RAM with less than 20 GB free:

Only 17.5 GB of this PC's 32 GB of RAM is free before the game starts.
In the world the game takes about 25 GB; with less than about 20 GB free here, Windows soon puts part of it
in the page file and frames can take seconds while the graphics card waits. Close other programs first
(browsers, game launchers, VR streaming apps) and start again.
  • victory_gpu::streamline::ram_free(): GlobalMemoryStatusEx's available physical memory, beside ram_and_page_files().
  • free_ram_warning(total, free): the test above, printed after memory_warning's. It only warns: the start goes on, as memory_warning's does.

How it was tested

  • GPU and profile: Radeon RX 9070 XT 16 GB, Ryzen 9 5900X, 32 GB RAM, Windows 11; Series S, PC FidelityFX upscaling, no frame generation, ray tracing off.
  • Before: no word at a start with 17 GB free; the game fell to frames of seconds a minute in.
  • After: the warning above at a start with 17.5 GB free (play log of 2026-11-30 13:40); none at a start with more than 20 GB free (play logs of 14:02 and 15:00, 33 and 59 minutes in the world without the paging stalls).
  • New test little_free_ram_is_said_on_a_32_gb_pc.
  • cargo test passed for the crates it touches: yes, cargo test -p victory -- play::. Clippy reports no warning on the lines this changes.

Checked for overlap

  • I searched the open pull requests for the same issue and for the files this touches. Related: #3397 adds a page-file warning where Windows sizes it; #3749 empties the working set while free RAM is low during play; #2638 lets the kept RAM's minimum go before the PC runs out. None says at the start that RAM is short.

🤖 Generated with Claude Code

**@⁠RustyTheDalek** on GitHub · 2026-11-30 17:16 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4191) `RustyTheDalek:feat/low-free-ram-warning` → `main` · +834 −824 · 33 files · 11 commits · closed without merging ## What it changes `victory play` already warns when RAM and page file together are under 52 GB (`memory_warning`). It does not look at how much RAM is free when the game starts, and on a 32 GB PC that decides how long the game plays before Windows starts paging it. On a Radeon RX 9070 XT with 32 GB of RAM and an 18 GB page file (so no `memory_warning`), the process held 25-26 GB private once in the world, 9-10 GB of it the PC's memory shared with the card: | Play log | RAM free at the start | What happened | |---|---|---| | 2026-11-29 | about 21 GB | 15-25 fps for 5 to 20 minutes, then frames of 5 s | | 2026-11-30 13:04 | about 17 GB (other programs open) | 0.1-0.3 fps a minute into the world: frames of 5 to 9 s with the card 1 % busy, about 6.5 GB of the process in the page file | With nothing else changed the second start just had less room. So `victory play` now says so before the start, on a PC of at most 40 GB of RAM with less than 20 GB free: ``` Only 17.5 GB of this PC's 32 GB of RAM is free before the game starts. In the world the game takes about 25 GB; with less than about 20 GB free here, Windows soon puts part of it in the page file and frames can take seconds while the graphics card waits. Close other programs first (browsers, game launchers, VR streaming apps) and start again. ``` - `victory_gpu::streamline::ram_free()`: `GlobalMemoryStatusEx`'s available physical memory, beside `ram_and_page_files()`. - `free_ram_warning(total, free)`: the test above, printed after `memory_warning`'s. It only warns: the start goes on, as `memory_warning`'s does. ## How it was tested - GPU and profile: Radeon RX 9070 XT 16 GB, Ryzen 9 5900X, 32 GB RAM, Windows 11; Series S, PC FidelityFX upscaling, no frame generation, ray tracing off. - Before: no word at a start with 17 GB free; the game fell to frames of seconds a minute in. - After: the warning above at a start with 17.5 GB free (play log of 2026-11-30 13:40); none at a start with more than 20 GB free (play logs of 14:02 and 15:00, 33 and 59 minutes in the world without the paging stalls). - New test `little_free_ram_is_said_on_a_32_gb_pc`. - `cargo test` passed for the crates it touches: yes, `cargo test -p victory -- play::`. Clippy reports no warning on the lines this changes. ## Checked for overlap - [x] I searched the open pull requests for the same issue and for the files this touches. Related: #3397 adds a page-file warning where Windows sizes it; #3749 empties the working set while free RAM is low during play; #2638 lets the kept RAM's minimum go before the PC runs out. None says at the start that RAM is short. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
The game with this layer holds about 25 GB once in the world. On a 32 GB PC
(Radeon RX 9070 XT, 18 GB page file, so no page-file warning) a start with
about 21 GB free played 5 to 20 minutes before Windows paged it; one with
about 17 GB free (other programs open) fell to frames of 5 to 9 s a minute
into the world, the card 1 % busy. The start now says so, after the RAM and
page-file warning, and goes on.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-30 18:08:20 +00:00
github-bot closed this pull request 2026-12-01 18:50:34 +00:00
Author
Owner

@⁠trustno1-coder on GitHub · 2026-12-01 18:46 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:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/4191#issuecomment-7321502045) 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!4192
No description provided.