Optimization tracker: GPU time and memory on 8 GB cards #2

Open
opened 2026-11-27 03:48:40 +00:00 by github-bot · 3 comments
Owner

@⁠brothernog on GitHub · 2026-11-26 17:39 UTC · original

What is being optimized, in order, with the numbers each step is measured by. Results go in comments here; this description is kept current.

Where a frame goes now

RTX 3050 8 GB, 32 GB, 1080p, Series S profile, diag build: 4.6 fps median, 218 ms a frame. Of it, 110 ms waiting for the GPU, 77 ms of CPU preparing work, 61 ms copying back. Memory is full: 31.4 of 32 GB of system memory in use, and up to 6.75 GB of video memory spilled into PC memory.

So the GPU is now the larger share of the frame, and memory is the wall.

Next, in order

  • 1. Internal render scale (VICTORY_RENDER_SCALE, from edsuuu/VI-BR-PORT 24f8d2e). The Series S profile renders at 0.67 of the output; 0.5 draws about 44% fewer pixels and makes the render targets smaller. Attacks the GPU time directly. Measure: 0.67 against 0.5, two runs each: median fps, gpu_wait_ms, vram_used_gb, and how the image looks (in words). Done when both are measured and the default is picked.
  • 2. Host memory admission (residency.rs, from TaynanGT/Vice-Tay, same module in avatarmanz/VIctory-7900XTX). When system memory or commit runs low, it holds back texture prefetch and frees idle staging and scratch blocks. Made for PCs with up to 32 GB. Measure: peak ram_used_gb and commit_gb, lowest-10% fps (stutter). Done when the peak drops below 30 GB without the median falling.
  • 3. Short textures under pressure (VICTORY_TEXTURE_SHORT, from LoverCatys/ruff-lab b3073ea9). When the card is out of room, a texture goes up without its largest levels instead of waiting. It switches itself off under a texture budget cap, which is why it could only be tried now. Measure: peak shared_used_gb, textures waiting, lowest-10% fps. Done when the spill into PC memory drops.
  • Check first, small: the layer never releases translated pipeline code (DXIL). Read how many MB it keeps; if it is a lot, release it.

Done

  • Texture budget cap removed (VICTORY_TEXTURE_BUDGET_MB unset): 3.35 to 4.6 fps median. The CPU stopped re-uploading textures (preparing 143 to 77 ms).
  • Texture levels on demand (VICTORY_LEVELS_ON_DEMAND=1): worse, 2.6 fps and the GPU starved (27% busy). Dropped.

How we measure

AGENTS.md, "Measure a change": build, warm after the build, run with VICTORY_OVERLAY_CSV, summarize with scripts\overlay-summary.ps1. Two runs per setting, the same route, one setting changed at a time. GPU programs and pipelines: #1.

AI-assisted.

**@⁠brothernog** on GitHub · 2026-11-26 17:39 UTC · [original](https://github.com/brothernog/rota/issues/2) What is being optimized, in order, with the numbers each step is measured by. Results go in comments here; this description is kept current. ## Where a frame goes now RTX 3050 8 GB, 32 GB, 1080p, Series S profile, `diag` build: **4.6 fps** median, 218 ms a frame. Of it, 110 ms waiting for the GPU, 77 ms of CPU preparing work, 61 ms copying back. Memory is full: 31.4 of 32 GB of system memory in use, and up to 6.75 GB of video memory spilled into PC memory. So the GPU is now the larger share of the frame, and memory is the wall. ## Next, in order - [ ] **1. Internal render scale** (`VICTORY_RENDER_SCALE`, from edsuuu/VI-BR-PORT `24f8d2e`). The Series S profile renders at 0.67 of the output; 0.5 draws about 44% fewer pixels and makes the render targets smaller. Attacks the GPU time directly. *Measure:* 0.67 against 0.5, two runs each: median fps, `gpu_wait_ms`, `vram_used_gb`, and how the image looks (in words). *Done when* both are measured and the default is picked. - [ ] **2. Host memory admission** (`residency.rs`, from TaynanGT/Vice-Tay, same module in avatarmanz/VIctory-7900XTX). When system memory or commit runs low, it holds back texture prefetch and frees idle staging and scratch blocks. Made for PCs with up to 32 GB. *Measure:* peak `ram_used_gb` and `commit_gb`, lowest-10% fps (stutter). *Done when* the peak drops below 30 GB without the median falling. - [ ] **3. Short textures under pressure** (`VICTORY_TEXTURE_SHORT`, from LoverCatys/ruff-lab `b3073ea9`). When the card is out of room, a texture goes up without its largest levels instead of waiting. It switches itself off under a texture budget cap, which is why it could only be tried now. *Measure:* peak `shared_used_gb`, textures waiting, lowest-10% fps. *Done when* the spill into PC memory drops. - [ ] **Check first, small:** the layer never releases translated pipeline code (DXIL). Read how many MB it keeps; if it is a lot, release it. ## Done - **Texture budget cap removed** (`VICTORY_TEXTURE_BUDGET_MB` unset): 3.35 to 4.6 fps median. The CPU stopped re-uploading textures (preparing 143 to 77 ms). - **Texture levels on demand** (`VICTORY_LEVELS_ON_DEMAND=1`): worse, 2.6 fps and the GPU starved (27% busy). Dropped. ## How we measure [AGENTS.md](https://github.com/brothernog/rota/blob/main/AGENTS.md), "Measure a change": build, warm after the build, run with `VICTORY_OVERLAY_CSV`, summarize with `scripts\overlay-summary.ps1`. Two runs per setting, the same route, one setting changed at a time. GPU programs and pipelines: #1. AI-assisted.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-27 03:48:40 +00:00
Author
Owner

@⁠nullrv on GitHub · 2026-11-26 20:15 UTC · original

Layer at bb78843, diag build, Series S profile, README settings
(VICTORY_RT_MISS=1, VICTORY_RELAY=2, VICTORY_THIN=0, VICTORY_DISPLAY_MODE=1920x1080,
VICTORY_PIPELINE_BOOK=1, VICTORY_MEMORY_CARD_MB=1024, VICTORY_UPSCALER=6, VICTORY_MEMORY_MAP=0),
render scale at its default. Only one card was enabled at a time, with the monitor on it.
Pipelines were warmed for each card. Two runs per card, same route each time.

Hardware

Part Details
CPU AMD Ryzen 9 5900X, 12 cores / 24 threads
RAM 32 GB DDR4 (2 × 16 GB), running at 3133 MT/s
Motherboard ASUS PRIME X570-PRO
GPU A NVIDIA GeForce RTX 3060 Ti, 8 GB
GPU B NVIDIA GeForce RTX 2060, 6 GB
GPU driver 621.40 (32.0.16.2140)
OS Windows 11 Home 25H2, build 26200
Title storage NVMe SSD (PCIe 4.0)
System drive / page file SATA SSD, page file managed by Windows

Results

All values are medians unless marked p10 or peak.

3060 Ti run 1 3060 Ti run 2 2060 run 1 2060 run 2
Time in the world (s) 142 96 107 94
fps 4.1 5.5 2.7 2.3
p10 fps 1.10 2.86 1.01 0.47
Frame time (ms) 241.8 182.7 371.2 428.8
preparing_ms 134.3 102.0 244.2 298.8
gpu_wait_ms 26.7 41.5 55.6 45.0
back_ms 45.3 51.7 66.7 66.5
copy_ms 32.7 34.8 73.9 67.9
texture_ms 46.0 21.2 123.2 180.2
texture_mb 21.2 29.3 30.5 52.4
CPU / GPU busy (%) 55 / 72.5 49 / 91.5 96 / 80 70.5 / 74.5
Peak textures waiting 20,477 24,332 32,999 24,295
Peak vram_used_gb 7.12 7.55 5.50 5.76
Peak shared_used_gb 7.27 7.22 6.51 6.04
Peak ram_used_gb (of 32) 28.59 28.70 26.28 26.91
Peak commit_gb 23.11 23.59 21.54 21.96
  • Unlike the baseline here (gpu_wait_ms 110, preparing_ms 77), these runs spend most of
    their time on the CPU side: gpu_wait_ms is 27–56, while preparing_ms is 102–299.
  • The 6 GB card runs at about half the frame rate. The difference is mostly preparing_ms,
    texture_ms and copy_ms; gpu_wait_ms is about the same. I can't tell from these numbers
    whether the extra texture traffic from the smaller card causes it.
  • Both cards spill 6–7.5 GB into PC memory, more than the 6.75 GB peak listed above.
  • The same route on the same card varied by 4.1 to 5.5 fps.

AI-assisted.

**@⁠nullrv** on GitHub · 2026-11-26 20:15 UTC · [original](https://github.com/brothernog/rota/issues/2#issuecomment-7202461182) Layer at `bb78843`, diag build, Series S profile, README settings (`VICTORY_RT_MISS=1`, `VICTORY_RELAY=2`, `VICTORY_THIN=0`, `VICTORY_DISPLAY_MODE=1920x1080`, `VICTORY_PIPELINE_BOOK=1`, `VICTORY_MEMORY_CARD_MB=1024`, `VICTORY_UPSCALER=6`, `VICTORY_MEMORY_MAP=0`), render scale at its default. Only one card was enabled at a time, with the monitor on it. Pipelines were warmed for each card. Two runs per card, same route each time. ### Hardware | Part | Details | |---|---| | CPU | AMD Ryzen 9 5900X, 12 cores / 24 threads | | RAM | 32 GB DDR4 (2 × 16 GB), running at 3133 MT/s | | Motherboard | ASUS PRIME X570-PRO | | GPU A | NVIDIA GeForce RTX 3060 Ti, 8 GB | | GPU B | NVIDIA GeForce RTX 2060, 6 GB | | GPU driver | 621.40 (32.0.16.2140) | | OS | Windows 11 Home 25H2, build 26200 | | Title storage | NVMe SSD (PCIe 4.0) | | System drive / page file | SATA SSD, page file managed by Windows | ### Results All values are medians unless marked p10 or peak. | | 3060 Ti run 1 | 3060 Ti run 2 | 2060 run 1 | 2060 run 2 | |---|---:|---:|---:|---:| | Time in the world (s) | 142 | 96 | 107 | 94 | | fps | 4.1 | 5.5 | 2.7 | 2.3 | | p10 fps | 1.10 | 2.86 | 1.01 | 0.47 | | Frame time (ms) | 241.8 | 182.7 | 371.2 | 428.8 | | `preparing_ms` | 134.3 | 102.0 | 244.2 | 298.8 | | `gpu_wait_ms` | 26.7 | 41.5 | 55.6 | 45.0 | | `back_ms` | 45.3 | 51.7 | 66.7 | 66.5 | | `copy_ms` | 32.7 | 34.8 | 73.9 | 67.9 | | `texture_ms` | 46.0 | 21.2 | 123.2 | 180.2 | | `texture_mb` | 21.2 | 29.3 | 30.5 | 52.4 | | CPU / GPU busy (%) | 55 / 72.5 | 49 / 91.5 | 96 / 80 | 70.5 / 74.5 | | Peak textures waiting | 20,477 | 24,332 | 32,999 | 24,295 | | Peak `vram_used_gb` | 7.12 | 7.55 | 5.50 | 5.76 | | Peak `shared_used_gb` | 7.27 | 7.22 | 6.51 | 6.04 | | Peak `ram_used_gb` (of 32) | 28.59 | 28.70 | 26.28 | 26.91 | | Peak `commit_gb` | 23.11 | 23.59 | 21.54 | 21.96 | - Unlike the baseline here (`gpu_wait_ms` 110, `preparing_ms` 77), these runs spend most of their time on the CPU side: `gpu_wait_ms` is 27–56, while `preparing_ms` is 102–299. - The 6 GB card runs at about half the frame rate. The difference is mostly `preparing_ms`, `texture_ms` and `copy_ms`; `gpu_wait_ms` is about the same. I can't tell from these numbers whether the extra texture traffic from the smaller card causes it. - Both cards spill 6–7.5 GB into PC memory, more than the 6.75 GB peak listed above. - The same route on the same card varied by 4.1 to 5.5 fps. AI-assisted.
Author
Owner

@⁠nullrv on GitHub · 2026-11-26 20:19 UTC · original

By the way, I made a comment on the other issue as well (#1).

I'm a professional software developer (although I don't have much experience with shaders and stuff, I do know some things). I have AI subscriptions and I'm happy to help with the work - let me know if there is something I should focus on researching and trying to not conflict on what you are doing.

PS: vi que seu perfil tá em português - um abraço brasileiro haha! 😄

**@⁠nullrv** on GitHub · 2026-11-26 20:19 UTC · [original](https://github.com/brothernog/rota/issues/2#issuecomment-7202540664) By the way, I made a comment on the other issue as well (https://git.gtahub.st/github/brothernog--rota/issues/1). I'm a professional software developer (although I don't have much experience with shaders and stuff, I do know some things). I have AI subscriptions and I'm happy to help with the work - let me know if there is something I should focus on researching and trying to not conflict on what you are doing. PS: vi que seu perfil tá em português - um abraço brasileiro haha! 😄
Author
Owner

@⁠brothernog on GitHub · 2026-11-26 20:25 UTC · original

@⁠nullrv: thanks for the full table, this is the most complete set of numbers here so far.

  • Your result that CPU preparing (preparing_ms 102-299) is above gpu_wait_ms (27-56) matches what I see on the 3050 once host-RAM residency is off: preparing ~100 ms against GPU wait ~60 ms. So the CPU side, not the GPU, is the next limit, and I am moving the texture pass off the submitting thread up the list (item 4 in #1).
  • The 6 GB card: I agree the numbers cannot separate "more texture traffic" from the rest. texture_ms is 123-180 there against 21-46 on the 8 GB card, and texture_mb is higher, so traffic is a likely part of it. Two runs per card are not enough to say more, and you saw 4.1 to 5.5 on the same card and route; mine is noisy the same way.
  • Spill into PC memory: you see 6-7.5 GB, I see 6.8-7.3 GB.

Progress here (RTX 3050 8 GB, 32 GB, Series S profile, diag build; single or paired runs, noisy). All of it is in main as of 66b96a4:

  • Item 1, render scale: VICTORY_RENDER_SCALE is ported. At 0.5, median 5.7 fps against 4.8 at base, 10% lows 2.8 against 1.9. I now run with VICTORY_RENDER_SCALE=0.5 by default.
  • Item 2, host-RAM residency: ported as VICTORY_RESIDENCY. Two run pairs were faster and smoother with it off (5.4 vs 4.8 and 5.7 vs ~5.0 fps median). System RAM peak stayed at about 31.5 GB either way. It is now opt-in (VICTORY_RESIDENCY=1).
  • Item 3, VICTORY_TEXTURE_SHORT: tried and reverted. Textures thrashed (154 MB of uploads a frame against 25-40), it saved only 71 MB, and the device was removed with DXGI_ERROR_INVALID_CALL. A static review points at 2D-array views skipping the mip rebase. Replacement being measured now: a fixed mip drop at texture creation, with array views rebased (VICTORY_TEXTURE_DROP_MIPS, from soldsawn/victory-nvidia-8gb 637a03fa).
  • Card-buffer copy limits: upstream raised them on 8-12 GB cards to 1/1024 MiB; the old 16/512 measured worse here (4.0 vs 4.8).

If you want to test on your two cards: VICTORY_RENDER_SCALE=0.5 (residency is off by default now), same route, two runs each, same columns as your table. The 2060 is the interesting one (CPU busy 96% in run 1). On where to help, see my reply in #1.

Valeu pela ajuda, um abraço!

This comment was AI-assisted.

**@⁠brothernog** on GitHub · 2026-11-26 20:25 UTC · [original](https://github.com/brothernog/rota/issues/2#issuecomment-7202671528) @⁠nullrv: thanks for the full table, this is the most complete set of numbers here so far. - Your result that CPU preparing (`preparing_ms` 102-299) is above `gpu_wait_ms` (27-56) matches what I see on the 3050 once host-RAM residency is off: preparing ~100 ms against GPU wait ~60 ms. So the CPU side, not the GPU, is the next limit, and I am moving the texture pass off the submitting thread up the list (item 4 in #1). - The 6 GB card: I agree the numbers cannot separate "more texture traffic" from the rest. `texture_ms` is 123-180 there against 21-46 on the 8 GB card, and `texture_mb` is higher, so traffic is a likely part of it. Two runs per card are not enough to say more, and you saw 4.1 to 5.5 on the same card and route; mine is noisy the same way. - Spill into PC memory: you see 6-7.5 GB, I see 6.8-7.3 GB. Progress here (RTX 3050 8 GB, 32 GB, Series S profile, `diag` build; single or paired runs, noisy). All of it is in `main` as of 66b96a4: - Item 1, render scale: `VICTORY_RENDER_SCALE` is ported. At 0.5, median 5.7 fps against 4.8 at base, 10% lows 2.8 against 1.9. I now run with `VICTORY_RENDER_SCALE=0.5` by default. - Item 2, host-RAM residency: ported as `VICTORY_RESIDENCY`. Two run pairs were faster and smoother with it off (5.4 vs 4.8 and 5.7 vs ~5.0 fps median). System RAM peak stayed at about 31.5 GB either way. It is now opt-in (`VICTORY_RESIDENCY=1`). - Item 3, `VICTORY_TEXTURE_SHORT`: tried and reverted. Textures thrashed (154 MB of uploads a frame against 25-40), it saved only 71 MB, and the device was removed with DXGI_ERROR_INVALID_CALL. A static review points at 2D-array views skipping the mip rebase. Replacement being measured now: a fixed mip drop at texture creation, with array views rebased (`VICTORY_TEXTURE_DROP_MIPS`, from soldsawn/victory-nvidia-8gb 637a03fa). - Card-buffer copy limits: upstream raised them on 8-12 GB cards to 1/1024 MiB; the old 16/512 measured worse here (4.0 vs 4.8). If you want to test on your two cards: `VICTORY_RENDER_SCALE=0.5` (residency is off by default now), same route, two runs each, same columns as your table. The 2060 is the interesting one (CPU busy 96% in run 1). On where to help, see my reply in #1. Valeu pela ajuda, um abraço! This comment was AI-assisted.
This discussion has been locked. Commenting is limited to contributors.
No description provided.