VICTORY_KEEP_RAM_GB: keep the game's memory in RAM on 32 GB PCs #568

Open
github-bot wants to merge 1 commit from github-bot/gh-568 into main AGit
Owner

@⁠arminkhaleghirod on GitHub · 2026-11-28 01:02 UTC · original
arminkhaleghirod:keep-ram → main · +37 −0 · 1 files · 1 commits · open

On my PC (32 GB RAM, RTX 4080) the game commits about 28 GB. Once free RAM ran low, Windows trimmed the game's working set from 15 GB to 2 GB at once, and it ran at half speed (22 fps down to 5-10) for minutes while it read its memory back from the page file. It kept happening, even in loading screens.

VICTORY_KEEP_RAM_GB= sets a hard minimum working set of n GB at start (SetProcessWorkingSetSizeEx with QUOTA_LIMITS_HARDWS_MIN_ENABLE), so Windows pages out other programs instead. With 14 the game stayed at 21-23 GB in RAM for a whole session and the slowdowns were gone. If Windows refuses the size, it says so and runs without it. Unset, nothing changes.

**@⁠arminkhaleghirod** on GitHub · 2026-11-28 01:02 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/568) `arminkhaleghirod:keep-ram` → `main` · +37 −0 · 1 files · 1 commits · open On my PC (32 GB RAM, RTX 4080) the game commits about 28 GB. Once free RAM ran low, Windows trimmed the game's working set from 15 GB to 2 GB at once, and it ran at half speed (22 fps down to 5-10) for minutes while it read its memory back from the page file. It kept happening, even in loading screens. VICTORY_KEEP_RAM_GB=<n> sets a hard minimum working set of n GB at start (SetProcessWorkingSetSizeEx with QUOTA_LIMITS_HARDWS_MIN_ENABLE), so Windows pages out other programs instead. With 14 the game stayed at 21-23 GB in RAM for a whole session and the slowdowns were gone. If Windows refuses the size, it says so and runs without it. Unset, nothing changes.
On a 32 GB PC the game commits about 28 GB. When free memory ran out,
Windows cut the process's working set from 15 GB to 2 GB in one go and
the game ran at half speed for minutes while it faulted its memory back
in from the page file. A hard minimum (QUOTA_LIMITS_HARDWS_MIN_ENABLE)
makes Windows page out other programs instead. Unset, nothing changes.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 01:06:56 +00:00
This pull request can be merged automatically.
You are not authorized to merge this pull request.
View command line instructions

Checkout

From your project repository, check out a new branch and test the changes.
git fetch -u origin '+refs/pull/568/head:github-bot/gh-568'
git switch 'github-bot/gh-568'

Merge

Merge the changes and update on Forgejo.
git switch 'main'
git merge --no-ff 'github-bot/gh-568'
git switch 'github-bot/gh-568'
git rebase 'main'
git switch 'main'
git merge --ff-only 'github-bot/gh-568'
git switch 'github-bot/gh-568'
git rebase 'main'
git switch 'main'
git merge --no-ff 'github-bot/gh-568'
git switch 'main'
git merge --squash 'github-bot/gh-568'
git switch 'main'
git merge --ff-only 'github-bot/gh-568'
git switch 'main'
git merge 'github-bot/gh-568'
git push origin 'main'
This discussion has been locked. Commenting is limited to contributors.
No description provided.