Launcher: renderer ports 6 and 7 on NVIDIA with ten or more cores #375

Open
github-bot wants to merge 2 commits from github-bot/gh-375 into main AGit
Owner

@⁠urielbeaupre on GitHub · 2026-11-27 20:35 UTC · original
urielbeaupre:perf/nvidia-ports-6-7 → main · +44 −0 · 2 files · 2 commits · open

Turns on renderer ports 6 (VICTORY_PORT_GUARD) and 7 (VICTORY_PORT_JOURNAL) in scripts/play.ps1 for NVIDIA cards on CPUs with ten or more physical cores, outside -Safe. -More still overrides either. Fewer cores keep the defaults, because port 6 measured slower on an eight-core 9800X3D in #364.

Why

A VICTORY_PROFILE sample of the submitting thread on current main (aa917f3) showed about a fifth of its time in write-watch askings and watch::guards. All of the time under guards was RwLock::write_contended: the wide threads refreshing copies queue behind one another on the guards' lock, which is what port 6 shares.

Measurements

RTX 4070 Ti 12 GB, Ryzen 9 7900X (12 cores), 63 GB, Windows 11 26200. Series S, diagnostics build of aa917f3, windowed 1920×1080, -Machine 4070, unattended through the opening. The window is 170–270 s after input began: the prison cell, the character at the window, 4,400–4,600 draws a frame, no pipelines being made.

Inside one run (VICTORY_AB=5,VICTORY_PORT_GUARD,VICTORY_PORT_JOURNAL; the mean of the phases' median frame times, 5–6 phases each):

Switches on Run 1 Run 2
neither 44.9 ms (22.3 fps) 44.1 ms (22.7 fps)
port 6 43.3 ms 42.9 ms
port 7 43.3 ms 42.9 ms
both 43.0 ms (23.3 fps) 42.1 ms (23.7 fps)

Separate runs (same build and warmed cache, order alternated): port 6 ran 23.1 and 22.6 fps median against 21.8 and 22.0 without it. CPU preparation fell from 35–38 to 33–34 ms a frame, write-watch askings from 20–22 to 8 ms a frame, and refused askings from 218 to 2 a frame. The first run with the switch made about 400 pipelines again; it is left out.

The measurements are added to docs/rtx4070-performance.md.

What this does not cover

  • One PC, one scene (the cell). Open world was not measured.
  • The 5080 tester's result (#364) suggests the core count matters. The threshold of ten is a judgment between their 8 cores and these 12, not a measured crossover.
  • The launcher's final settings were printed for -Machine 4070 and auto, with and without -Safe: both switches on outside -Safe on this 12-core PC, neither under it. (The first commit missed -Machine 4070, because $hasNvidia is only looked up for auto and 7900xtx; fixed in the second.)

Verification

cargo xtask policy and cargo test -p xtask pass. play.ps1 parses with no errors.

🤖 Generated with Claude Code

**@⁠urielbeaupre** on GitHub · 2026-11-27 20:35 UTC · [original](https://github.com/TaynanGT/Vice-Tay/pull/375) `urielbeaupre:perf/nvidia-ports-6-7` → `main` · +44 −0 · 2 files · 2 commits · open Turns on renderer ports 6 (`VICTORY_PORT_GUARD`) and 7 (`VICTORY_PORT_JOURNAL`) in `scripts/play.ps1` for NVIDIA cards on CPUs with **ten or more physical cores**, outside `-Safe`. `-More` still overrides either. Fewer cores keep the defaults, because port 6 measured slower on an eight-core 9800X3D in #364. ## Why A `VICTORY_PROFILE` sample of the submitting thread on current main (`aa917f3`) showed about a fifth of its time in write-watch askings and `watch::guards`. All of the time under `guards` was `RwLock::write_contended`: the wide threads refreshing copies queue behind one another on the guards' lock, which is what port 6 shares. ## Measurements RTX 4070 Ti 12 GB, Ryzen 9 7900X (12 cores), 63 GB, Windows 11 26200. Series S, diagnostics build of `aa917f3`, windowed 1920×1080, `-Machine 4070`, unattended through the opening. The window is 170–270 s after input began: the prison cell, the character at the window, 4,400–4,600 draws a frame, no pipelines being made. **Inside one run** (`VICTORY_AB=5,VICTORY_PORT_GUARD,VICTORY_PORT_JOURNAL`; the mean of the phases' median frame times, 5–6 phases each): | Switches on | Run 1 | Run 2 | |---|---:|---:| | neither | 44.9 ms (22.3 fps) | 44.1 ms (22.7 fps) | | port 6 | 43.3 ms | 42.9 ms | | port 7 | 43.3 ms | 42.9 ms | | both | **43.0 ms (23.3 fps)** | **42.1 ms (23.7 fps)** | **Separate runs** (same build and warmed cache, order alternated): port 6 ran 23.1 and 22.6 fps median against 21.8 and 22.0 without it. CPU preparation fell from 35–38 to 33–34 ms a frame, write-watch askings from 20–22 to 8 ms a frame, and refused askings from 218 to 2 a frame. The first run with the switch made about 400 pipelines again; it is left out. The measurements are added to `docs/rtx4070-performance.md`. ## What this does not cover - One PC, one scene (the cell). Open world was not measured. - The 5080 tester's result (#364) suggests the core count matters. The threshold of ten is a judgment between their 8 cores and these 12, not a measured crossover. - The launcher's final settings were printed for `-Machine 4070` and `auto`, with and without `-Safe`: both switches on outside `-Safe` on this 12-core PC, neither under it. (The first commit missed `-Machine 4070`, because `$hasNvidia` is only looked up for `auto` and `7900xtx`; fixed in the second.) ## Verification `cargo xtask policy` and `cargo test -p xtask` pass. `play.ps1` parses with no errors. 🤖 Generated with [Claude Code](https://claude.com/claude-code)
On a Ryzen 9 7900X (12 cores) with an RTX 4070 Ti, Series S, in the
prison cell: each switch took 1.2-1.6 ms off a 44-45 ms frame and both
1.9-2.0 ms, in two runs switching every 5 s (VICTORY_AB); across separate
runs port 6 took the median from 21.9 to 22.9 fps. Port 6 measured slower
on an eight-core 9800X3D (#364), so fewer cores keep the defaults. Not
under -Safe; -More overrides. Measurements in docs/rtx4070-performance.md.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 20:41:31 +00:00
$hasNvidia is only looked up for -Machine auto and 7900xtx, so with -Machine 4070 the switches were never set. The branch is already the NVIDIA presets' alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
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 origin '+refs/pull/375/head:github-bot/gh-375'
git switch 'github-bot/gh-375'

Merge

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