[pr-performance] Play: less RAM kept — windows grown only as asked, spare blocks scaled and halved #59

Open
Coder629nx wants to merge 1 commit from Coder629nx/Darner:less-ram-kept into main
First-time contributor
  • Fluxer ID: — already holds the Contributor role on the Darner Fluxer server.

What it changes

RAM reports keep naming two keepings: empty texture blocks and windows of title memory that reach past what the title asked.

  1. The empty 64 MiB texture blocks kept for reuse while the card has room were 64, 4 GiB of the PC's commit. The plain cap (DARNER_SPARE_BLOCKS) is halved to 32, 2 GiB (pool.rs), and DARNER_SPARE_SCALE=1, now set in darner.exe and play-nvidia.ps1, caps them by the card's budget besides: with DARNER_RIPE_BLOCKS=0 a 16 GiB card keeps 8 blocks (512 MiB) and a 24 GiB card 12, under the 32-block cap.
  2. A window for a read without a set length reached past its 4 MiB cell's end and the reach beyond it; such windows held about 3.7 GiB of an 8 GiB card's shared memory in one log. DARNER_WINDOW_GROW=1 and DARNER_WINDOW_BUFFER_END=1, now set in darner.exe and play-nvidia.ps1, grow a window only over what was asked and hold an unsized read no further than its buffer's end.

A switch set by hand wins as before, and all three stay off outside darner.exe and the launcher. README rows updated.

How it was tested

  • Tested revision: 4a92569 plus this one change; no rig, no on-rig measurement of commit, private bytes, shared GPU memory or fps yet.
  • Commands and results: the two gains are taken from figures the project itself recorded (the 3.7 GiB of shared memory in one log; 64 spare blocks being 4 GiB of commit). The launcher table and play mode's defaults agree (the the_powershell_launcher_sets_no_play_default_differently test; simulated here, runs in CI), and the pool scaling table in pool.rs's tests asserts against the constants and passes with the halved cap.
  • Not a leak fix by claim: the known long-play leak (DARNER_PLACED_NORMAL) is already on by default, and without a rig no new leak was identified. What this does is bound the two documented growth paths — spare blocks by the card's budget, windows to what was asked and the buffer's end — so neither can grow past its ceiling again.
  • Gameplay: not measured yet. A bench of commit and shared GPU memory over a 20-minute drive against main would settle it.
  • Shader wave sizes tested: not relevant (no shader changes).
  • Coverage gaps: no rig measurement; risks named in the commit (a changed window's copies may lag a frame behind each other; fewer spare blocks may make more allocations as the card fills).

Checklist

  • This PR contains one change based on main.
  • The diff follows docs/asset-policy.md (text only: README, two .rs files, one .ps1).
  • 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 found.
- Fluxer ID: — already holds the Contributor role on the Darner Fluxer server. ## What it changes RAM reports keep naming two keepings: empty texture blocks and windows of title memory that reach past what the title asked. 1. The empty 64 MiB texture blocks kept for reuse while the card has room were 64, 4 GiB of the PC's commit. The plain cap (`DARNER_SPARE_BLOCKS`) is halved to 32, 2 GiB (`pool.rs`), and `DARNER_SPARE_SCALE=1`, now set in `darner.exe` and `play-nvidia.ps1`, caps them by the card's budget besides: with `DARNER_RIPE_BLOCKS=0` a 16 GiB card keeps 8 blocks (512 MiB) and a 24 GiB card 12, under the 32-block cap. 2. A window for a read without a set length reached past its 4 MiB cell's end and the reach beyond it; such windows held about 3.7 GiB of an 8 GiB card's shared memory in one log. `DARNER_WINDOW_GROW=1` and `DARNER_WINDOW_BUFFER_END=1`, now set in `darner.exe` and `play-nvidia.ps1`, grow a window only over what was asked and hold an unsized read no further than its buffer's end. A switch set by hand wins as before, and all three stay off outside `darner.exe` and the launcher. README rows updated. ## How it was tested - Tested revision: 4a92569 plus this one change; no rig, no on-rig measurement of commit, private bytes, shared GPU memory or fps yet. - Commands and results: the two gains are taken from figures the project itself recorded (the 3.7 GiB of shared memory in one log; 64 spare blocks being 4 GiB of commit). The launcher table and play mode's defaults agree (the `the_powershell_launcher_sets_no_play_default_differently` test; simulated here, runs in CI), and the pool scaling table in `pool.rs`'s tests asserts against the constants and passes with the halved cap. - Not a leak fix by claim: the known long-play leak (`DARNER_PLACED_NORMAL`) is already on by default, and without a rig no new leak was identified. What this does is bound the two documented growth paths — spare blocks by the card's budget, windows to what was asked and the buffer's end — so neither can grow past its ceiling again. - Gameplay: not measured yet. A bench of commit and shared GPU memory over a 20-minute drive against `main` would settle it. - Shader wave sizes tested: not relevant (no shader changes). - Coverage gaps: no rig measurement; risks named in the commit (a changed window's copies may lag a frame behind each other; fewer spare blocks may make more allocations as the card fills). ## Checklist - [x] This PR contains one change based on `main`. - [x] The diff follows `docs/asset-policy.md` (text only: README, two .rs files, one .ps1). - [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 found.
RAM reports keep naming two keepings: empty texture blocks and windows of
title memory that reach past what the title asked.

The empty 64 MiB texture blocks kept for reuse while the card has room
were 64, 4 GiB of the PC's commit. The plain cap (DARNER_SPARE_BLOCKS)
is halved to 32, 2 GiB, and DARNER_SPARE_SCALE=1, now in darner.exe and
the launcher, caps them by the card's budget besides: with
DARNER_RIPE_BLOCKS=0 a 16 GiB card keeps 8 blocks (512 MiB) and a
24 GiB card 12, under the 32-block cap.

A window for a read without a set length reached past its 4 MiB cell's
end and the reach beyond it; such windows held about 3.7 GiB of an
8 GiB card's shared memory in one log. DARNER_WINDOW_GROW=1 and
DARNER_WINDOW_BUFFER_END=1, now in darner.exe and the launcher, grow a
window only over what was asked and hold an unsized read no further
than its buffer's end.

A switch set by hand wins as before, and all three stay off outside
darner.exe and the launcher. Not measured on a rig; the gains hold where
those paths held. Risks: a changed window's copies may lag a frame
behind each other, and fewer spare blocks may make more allocations as
the card fills.
This pull request can be merged automatically.
This branch is out-of-date with the base branch
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 'less-ram-kept:Coder629nx-less-ram-kept'
git switch 'Coder629nx-less-ram-kept'

Merge

Merge the changes and update on Forgejo.

Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.

git switch 'main'
git merge --no-ff 'Coder629nx-less-ram-kept'
git switch 'Coder629nx-less-ram-kept'
git rebase 'main'
git switch 'main'
git merge --ff-only 'Coder629nx-less-ram-kept'
git switch 'Coder629nx-less-ram-kept'
git rebase 'main'
git switch 'main'
git merge --no-ff 'Coder629nx-less-ram-kept'
git switch 'main'
git merge --squash 'Coder629nx-less-ram-kept'
git switch 'main'
git merge --ff-only 'Coder629nx-less-ram-kept'
git switch 'main'
git merge 'Coder629nx-less-ram-kept'
git push origin 'main'
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!59
No description provided.