RTX 2070 SUPER 8 GB, Series S: the own-bytes pool (#221) and CARD_BUFFERS_MIN_KB=64 + MB=1024 take the frame from 353 to 180 ms #367

Open
opened 2026-11-26 19:46:59 +00:00 by github-bot · 1 comment
Owner

@⁠Jesper-Andersson on GitHub · 2026-11-26 19:44 UTC · original

Machine

  • GPU: NVIDIA RTX 2070 SUPER 8 GB (budget about 6.6 GB)
  • CPU / RAM / OS: Ryzen 7 5800X / 32 GB / Windows 11 Pro 26320
  • Repo: a local branch on 2de9980 (main) plus open PRs. B and D ran without the pool; E and F ran with pr0vId3nce's own-bytes pool from #221 (VIctory-NVIDIA 67a50c6 + 835d4e8), #327, #333, #337 and #360. Diag build.
  • Series S, DLSS Quality (VICTORY_UPSCALE=dlss), scripts\play.ps1 defaults otherwise.

What was run

.\scripts\play.ps1 -Exe <title> -Console series-s -More @{ VICTORY_UPSCALE='dlss'; VICTORY_DLSS_QUALITY='0'; ... }
  B: as above (8 translation threads)
  D: B + VICTORY_THIN_THREADS=14 (and DLSS preset J)
  E: the own-bytes pool (#221)
  F: E + VICTORY_CARD_BUFFERS_MIN_KB=64 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_WIDE_MERGE=1

Results

Medians over gameplay seconds (frame lines under 25 fps). E and F are short runs (3-4 minutes against B's 7), so their numbers are rough.

per frame B D (14 threads) E (pool) F (E + card buffers)
frame, median 353 ms 371 ms 266 ms 180 ms
title waiting at presents 180 ms 194 ms 16.5 ms 9.2 ms
list translation, all threads (VICTORY_THIN) 2.3 s 3.4 s about 0.4 s —
waited for at the lists' close (heap pass) 33 ms 29 ms 5.7 ms 5.2 ms
new memory waited for (VICTORY_WAIT_RESIDENT), since the start 300,000 times, 81 s 164,000 times, 40 s 27,000 times —
CPU compares / snapshots of shader writes 182 / 133 MB 181 / 97 MB 172 / 94 MB 0 / 0
guards' lock waits 40.5 ms 32.5 ms 52.8 ms 64.0 ms
card memory in use / budget 5.5 / 6.6 GB 5.2 / 6.6 GB 5.6 / 6.7 GB
  • No device loss in any run.
  • Dropped draws without a host pipeline are about 300 a frame in each run: the ray-tracing builder is off, plus the refused computes known from #70.
  • F was the first run after a translator version change. Its worst frames are pipelines still being made.
  • By eye, F is noticeably smoother.

Notes

  • #221 on this card. The cause it describes is here too: shadow::exact makes about 330 shared buffers a frame under one lock, each made resident and mapped. 85-91 % of the "new memory waited for" calls come from these copies.
    • The translation threads spend 75-85 % of the frame waiting, with about 24 ms of CPU each.
    • That is why 14 threads made it worse (D): more waiters behind one holder.
    • pr0vId3nce's pool takes the frame from 353 to 266 ms here.
  • #343 on 8 GB. VICTORY_CARD_BUFFERS_MIN_KB=64 helps on an 8 GB card too, as long as VICTORY_CARD_BUFFERS_MB is raised to 1024: the copies in the card's memory came to 855 MB, more than the default 512. It removes about 265 MB a frame of CPU compares and snapshots. VRAM stayed within the budget. "Passes that made none for lack of room" did not rise (1,956 in E, 1,676 in F). #180's headroom/LRU would be the safety net.
  • VICTORY_WIDE_MERGE=1 does nothing with the relay on (from reading the code): it is read only in Host::card_back, and the relay lands on its own threads.
  • What is left after F: the guards' lock (53-64 ms of waits a frame), and the constants heap that port 1 leaves out under PORT_ALL (#365); the frame-line counters that hid the translation waits are #366.

AI use

Log analysis and write-up with AI assistance (Claude Code). The runs are my own.

**@⁠Jesper-Andersson** on GitHub · 2026-11-26 19:44 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/367) ## Machine - GPU: NVIDIA RTX 2070 SUPER 8 GB (budget about 6.6 GB) - CPU / RAM / OS: Ryzen 7 5800X / 32 GB / Windows 11 Pro 26320 - Repo: a local branch on `2de9980` (main) plus open PRs. B and D ran without the pool; E and F ran with pr0vId3nce's own-bytes pool from #221 (VIctory-NVIDIA 67a50c6 + 835d4e8), #327, #333, #337 and #360. Diag build. - Series S, DLSS Quality (`VICTORY_UPSCALE=dlss`), `scripts\play.ps1` defaults otherwise. ## What was run ``` .\scripts\play.ps1 -Exe <title> -Console series-s -More @{ VICTORY_UPSCALE='dlss'; VICTORY_DLSS_QUALITY='0'; ... } B: as above (8 translation threads) D: B + VICTORY_THIN_THREADS=14 (and DLSS preset J) E: the own-bytes pool (#221) F: E + VICTORY_CARD_BUFFERS_MIN_KB=64 VICTORY_CARD_BUFFERS_MB=1024 VICTORY_WIDE_MERGE=1 ``` ## Results Medians over gameplay seconds (frame lines under 25 fps). E and F are short runs (3-4 minutes against B's 7), so their numbers are rough. | per frame | B | D (14 threads) | E (pool) | F (E + card buffers) | |---|---|---|---|---| | frame, median | 353 ms | 371 ms | 266 ms | 180 ms | | title waiting at presents | 180 ms | 194 ms | 16.5 ms | 9.2 ms | | list translation, all threads (`VICTORY_THIN`) | 2.3 s | 3.4 s | about 0.4 s | — | | waited for at the lists' close (heap pass) | 33 ms | 29 ms | 5.7 ms | 5.2 ms | | new memory waited for (`VICTORY_WAIT_RESIDENT`), since the start | 300,000 times, 81 s | 164,000 times, 40 s | 27,000 times | — | | CPU compares / snapshots of shader writes | 182 / 133 MB | 181 / 97 MB | 172 / 94 MB | 0 / 0 | | guards' lock waits | 40.5 ms | 32.5 ms | 52.8 ms | 64.0 ms | | card memory in use / budget | 5.5 / 6.6 GB | | 5.2 / 6.6 GB | 5.6 / 6.7 GB | - No device loss in any run. - Dropped draws without a host pipeline are about 300 a frame in each run: the ray-tracing builder is off, plus the refused computes known from #70. - F was the first run after a translator version change. Its worst frames are pipelines still being made. - By eye, F is noticeably smoother. ## Notes - **#221 on this card.** The cause it describes is here too: `shadow::exact` makes about 330 shared buffers a frame under one lock, each made resident and mapped. 85-91 % of the "new memory waited for" calls come from these copies. - The translation threads spend 75-85 % of the frame waiting, with about 24 ms of CPU each. - That is why 14 threads made it worse (D): more waiters behind one holder. - pr0vId3nce's pool takes the frame from 353 to 266 ms here. - **#343 on 8 GB.** `VICTORY_CARD_BUFFERS_MIN_KB=64` helps on an 8 GB card too, as long as `VICTORY_CARD_BUFFERS_MB` is raised to 1024: the copies in the card's memory came to 855 MB, more than the default 512. It removes about 265 MB a frame of CPU compares and snapshots. VRAM stayed within the budget. "Passes that made none for lack of room" did not rise (1,956 in E, 1,676 in F). #180's headroom/LRU would be the safety net. - **`VICTORY_WIDE_MERGE=1` does nothing with the relay on** (from reading the code): it is read only in `Host::card_back`, and the relay lands on its own threads. - **What is left after F:** the guards' lock (53-64 ms of waits a frame), and the constants heap that port 1 leaves out under `PORT_ALL` (#365); the frame-line counters that hid the translation waits are #366. ## AI use Log analysis and write-up with AI assistance (Claude Code). The runs are my own.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-26 19:46:59 +00:00
Author
Owner

@⁠Jesper-Andersson on GitHub · 2026-11-27 03:16 UTC · original

More from the same PC (RTX 2070 SUPER 8 GB, Ryzen 7 5800X, 32 GB, Series S + DLSS), on a local branch: test-perf 3e9bbf7, which is a local test branch with upstream main merged, without Marvisak #3155. VICTORY_CARD_BUFFERS_MIN_KB=64, VICTORY_CARD_BUFFERS_MB=1024 and VICTORY_SUBMIT_FRAMES=2 are on, as in F above. Diag build. Gameplay = frame lines with over 1,000 draws, medians over 23 s of gameplay.

With the card buffers on, the frame is now about 115-145 ms (was 180 in F). What is left points at the copies of title memory that stay in the PC's memory.

per frame
frame 143.9 ms median (one second: 115 ms)
preparing 62.6 ms: copies 21.1 ms / 70.6 MB, heap buffer pass 15.5 ms
copying back 22.3 ms / 24.6 MB (111 MB put back into title memory, VICTORY_EXACT_BACK)
card busy by the card's clock 69 % (90-98 % in the busiest seconds, the submitting thread then waits 15-20 ms for the card)
submissions 16.8
process CPU 867 ms user + 107 ms kernel on all threads (about 8 of 16 busy)
list calls 37,631, 333 ms over 8 threads
write trackers' locks guards: 270 waits, 67.5 ms over all threads

Memory at the same moment:

video memory: the card's own: budget 6926 MB, in use 6539 MB; the PC's shared with the card: in use 6812 MB
host copies of title memory: 9643 alive 4834 MB; made so far: 16737 shared buffers 11806 MB, 8444 card buffers 1468 MB
memory: 22655 MB private (the PC has 2045 MB free)

Every host copy is a Host::shared_buffer (host.rs, custom heap, write-back, MEMORY_POOL_L0). So apart from the 1 GB of card buffers, every shader read of a title buffer crosses PCIe 3.0, at about 12 GB/s against the card's 448 GB/s. Microsoft's residency page: "the wrong resource in system-memory can severely impact frame rate". F's gain from moving 1 GB of buffers to the card fits this.

Two caveats:

  • "Card busy" counts from the send of a submission to the moment a thread wakes behind its signal, so the system's hand-off is in it (#366 / #387). A run with VICTORY_CARD_SPANS=1 (the card's own timestamps; same worktree, one startup-only commit later) gives, as medians over 41 s of gameplay per frame: frame 150 ms, the card working 86.9 ms (60 % of the frame) in 17 submissions, 39 ms idle between them. The clock's 67 % busy is about 17 ms more than the card's own count. So the card's own work is the largest single part of the frame here, and the PCIe reads above are the first suspect for it.
  • The card's memory is nearly full (6.5 of 6.9 GB), so a larger VICTORY_CARD_BUFFERS_MB competes with textures and the 1,280 MB kept for targets (#407).

Related work that targets this, none of it measured on an 8 GB card yet as far as I can find: Marvisak/VIctory#2705 (VICTORY_CARD_COPIES, a card side for host copies) and fxceless/victory-fork#772 / #980 (VICTORY_INPLACE=4, hot title memory in VRAM, written back by a compute pass).

This comment was made with AI assistance (Claude Code).

**@⁠Jesper-Andersson** on GitHub · 2026-11-27 03:16 UTC · [original](https://github.com/avatarmanz/VIctory-7900XTX/issues/367#issuecomment-7208845116) More from the same PC (RTX 2070 SUPER 8 GB, Ryzen 7 5800X, 32 GB, Series S + DLSS), on a local branch: `test-perf` 3e9bbf7, which is a local test branch with upstream main merged, without Marvisak #3155. `VICTORY_CARD_BUFFERS_MIN_KB=64`, `VICTORY_CARD_BUFFERS_MB=1024` and `VICTORY_SUBMIT_FRAMES=2` are on, as in F above. Diag build. Gameplay = frame lines with over 1,000 draws, medians over 23 s of gameplay. With the card buffers on, the frame is now about 115-145 ms (was 180 in F). What is left points at the copies of title memory that stay in the PC's memory. | per frame | | |---|---| | frame | 143.9 ms median (one second: 115 ms) | | preparing | 62.6 ms: copies 21.1 ms / 70.6 MB, heap buffer pass 15.5 ms | | copying back | 22.3 ms / 24.6 MB (111 MB put back into title memory, `VICTORY_EXACT_BACK`) | | card busy by the card's clock | 69 % (90-98 % in the busiest seconds, the submitting thread then waits 15-20 ms for the card) | | submissions | 16.8 | | process CPU | 867 ms user + 107 ms kernel on all threads (about 8 of 16 busy) | | list calls | 37,631, 333 ms over 8 threads | | write trackers' locks | guards: 270 waits, 67.5 ms over all threads | Memory at the same moment: ``` video memory: the card's own: budget 6926 MB, in use 6539 MB; the PC's shared with the card: in use 6812 MB host copies of title memory: 9643 alive 4834 MB; made so far: 16737 shared buffers 11806 MB, 8444 card buffers 1468 MB memory: 22655 MB private (the PC has 2045 MB free) ``` Every host copy is a `Host::shared_buffer` (`host.rs`, custom heap, write-back, `MEMORY_POOL_L0`). So apart from the 1 GB of card buffers, every shader read of a title buffer crosses PCIe 3.0, at about 12 GB/s against the card's 448 GB/s. Microsoft's residency page: "the wrong resource in system-memory can severely impact frame rate". F's gain from moving 1 GB of buffers to the card fits this. Two caveats: - "Card busy" counts from the send of a submission to the moment a thread wakes behind its signal, so the system's hand-off is in it (#366 / #387). A run with `VICTORY_CARD_SPANS=1` (the card's own timestamps; same worktree, one startup-only commit later) gives, as medians over 41 s of gameplay per frame: frame 150 ms, the card working **86.9 ms** (60 % of the frame) in 17 submissions, 39 ms idle between them. The clock's 67 % busy is about 17 ms more than the card's own count. So the card's own work is the largest single part of the frame here, and the PCIe reads above are the first suspect for it. - The card's memory is nearly full (6.5 of 6.9 GB), so a larger `VICTORY_CARD_BUFFERS_MB` competes with textures and the 1,280 MB kept for targets (#407). Related work that targets this, none of it measured on an 8 GB card yet as far as I can find: Marvisak/VIctory#2705 (`VICTORY_CARD_COPIES`, a card side for host copies) and fxceless/victory-fork#772 / #980 (`VICTORY_INPLACE=4`, hot title memory in VRAM, written back by a compute pass). This comment was made with AI assistance (Claude Code).
This discussion has been locked. Commenting is limited to contributors.
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/avatarmanz--VIctory-7900XTX#367
No description provided.