8 GB cards: sweep() takes 28-79 ms every second on the submitting thread (slot_evict walks) #1644

Closed
opened 2026-11-28 22:57:35 +00:00 by github-bot · 9 comments
Owner

@⁠icdmkg2 on GitHub · 2026-11-28 22:56 UTC · original

On an 8 GB card, sweep() (host.rs) takes 28–79 ms every second on the submitting thread, the thread every frame waits for. It runs "once a second, before a submission starts".

Setup: RTX 5060 Laptop GPU (8 GB, local budget 7.1 GB), Ryzen 7 H 260, Windows 11, main plus the #43 revert, release build, Series S, DLSS performance, slot eviction on (VICTORY_SLOT_EVICT=1 from the launcher), the prologue's cell.

Measured by timing each step of sweep(). Every sweep in 90 s of play logged over 4 ms; values in ms:

typical range
resource::let_go_idle (with slot_evict) 27–30 26–49
trim_spare_uploads + trim_spare_chunks 4–9 1–24
pool::room 0 once 43
the rest ~0

let_go_idle's own pass over textures is only about 3 ms (its "looks for textures to let go" line). The other 25–45 ms is slot_evict. On an 8 GB card the line is always crossed, so every pass walks every texture and then descriptor::evictable_slots walks the heap's slots. A sampling profile of the diagnostics build has evictable_slots at about 4% of victory-submit, and host::sweep at about 6%.

What I tried, and why it isn't a PR: resting slot_evict for 8 s after a pass that let nothing go brought that part down to 2–5 ms most seconds. But in an alternating A/B (two runs each), frames got worse: median frame time 50–53 ms against 47 ms, and 9–10 frames over 50 ms per 5 s window against 6–7. The likely cause is that VRAM goes past its line and the driver starts paging. Freeing spare upload chunks on another thread was in the same A/B. So the passes are needed. The cost seems to come from where they run (the submitting thread) and how (whole-table walks), not from how often.

Ideas that might keep the eviction and lose the stall:

  • keep candidate textures and slots in a structure updated as they change, instead of walking everything each second;
  • or run the walk off the submitting thread, and apply only the result at the start of a submission.

There are probably constraints in evict_slots/texture_made that I don't know, hence an issue rather than a guess.

**@⁠icdmkg2** on GitHub · 2026-11-28 22:56 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644) On an **8 GB card**, `sweep()` (`host.rs`) takes **28–79 ms every second on the submitting thread**, the thread every frame waits for. It runs "once a second, before a submission starts". **Setup:** RTX 5060 Laptop GPU (8 GB, local budget 7.1 GB), Ryzen 7 H 260, Windows 11, `main` plus the #43 revert, release build, Series S, DLSS performance, slot eviction on (`VICTORY_SLOT_EVICT=1` from the launcher), the prologue's cell. **Measured** by timing each step of `sweep()`. Every sweep in 90 s of play logged over 4 ms; values in ms: | | typical | range | |---|---|---| | `resource::let_go_idle` (with `slot_evict`) | 27–30 | 26–49 | | `trim_spare_uploads` + `trim_spare_chunks` | 4–9 | 1–24 | | `pool::room` | 0 | once 43 | | the rest | ~0 | | `let_go_idle`'s own pass over textures is only about 3 ms (its "looks for textures to let go" line). The other 25–45 ms is `slot_evict`. On an 8 GB card the line is always crossed, so every pass walks every texture and then `descriptor::evictable_slots` walks the heap's slots. A sampling profile of the diagnostics build has `evictable_slots` at about 4% of `victory-submit`, and `host::sweep` at about 6%. **What I tried, and why it isn't a PR:** resting `slot_evict` for 8 s after a pass that let nothing go brought that part down to 2–5 ms most seconds. But in an alternating A/B (two runs each), frames got **worse**: median frame time 50–53 ms against 47 ms, and 9–10 frames over 50 ms per 5 s window against 6–7. The likely cause is that VRAM goes past its line and the driver starts paging. Freeing spare upload chunks on another thread was in the same A/B. So the passes are needed. The cost seems to come from **where** they run (the submitting thread) and **how** (whole-table walks), not from how often. Ideas that might keep the eviction and lose the stall: - keep candidate textures and slots in a structure updated as they change, instead of walking everything each second; - or run the walk off the submitting thread, and apply only the result at the start of a submission. There are probably constraints in `evict_slots`/`texture_made` that I don't know, hence an issue rather than a guess.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-11-28 22:57:35 +00:00
Author
Owner

@⁠github-actions[bot] on GitHub · 2026-11-28 22:56 UTC · original

Please attach both logs from the run that went wrong. Without them we can only guess. Paste %LOCALAPPDATA% into the address bar of File Explorer to get there.

  1. The play log, in %LOCALAPPDATA%\victory\logs\: the newest victory-nvidia-play-<date>-<time>-<number>.log (from victory.exe) or victory-nvidia-<date>-<time>.log (from the script launcher). The window shows its path at the start, on the line Log: ....
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, and, if there is one from that run, the newest victory-<date>-<time>-<number>.crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\.

Also say which GPU, Windows version (10 or 11)

**@⁠github-actions[bot]** on GitHub · 2026-11-28 22:56 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7247089705) Please attach both logs from the run that went wrong. Without them we can only guess. Paste `%LOCALAPPDATA%` into the address bar of File Explorer to get there. 1. The play log, in `%LOCALAPPDATA%\victory\logs\`: the newest `victory-nvidia-play-<date>-<time>-<number>.log` (from `victory.exe`) or `victory-nvidia-<date>-<time>.log` (from the script launcher). The window shows its path at the start, on the line `Log: ...`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, and, if there is one from that run, the newest `victory-<date>-<time>-<number>.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\`. Also say which GPU, Windows version (10 or 11)
Author
Owner

@⁠kalberts0089-hash on GitHub · 2026-11-29 08:00 UTC · original · edited 2026-11-29 08:50 UTC

I can't reproduce the timings (I can't run the game here, and my card is 12 GB), but I read the code at e1f2eb6 and it fits what you measured. Notes below, plus a microbenchmark of the slot walk.

Where it runs. sweep() (crates/victory-gpu/src/host.rs:524) is called from HostQueue::submit (host.rs:6283) at the stage "submit: the sweep" (host.rs:6389, calls at 6399 and 6409), before the submission counts as started. With VICTORY_ASYNC_SUBMIT that is the victory-submit thread (queue/behind.rs:794).

Why the logged number hides it. resource::let_go_idle records SWEPT_US (resource.rs:2966-2968) before it calls slot_evict (resource.rs:2972). So the "looks for textures to let go, X ms each" line (host.rs:10734-10739) only covers the texture pass.

What slot_evict walks once the card is over its line (it returns early when need == 0, resource.rs:3170, and when no idle candidate is found, resource.rs:3204):

  1. every texture in textures(), taking r.host.made for each idle candidate (resource.rs:3179-3203);
  2. descriptor::evictable_slots (descriptor.rs:1693) holds the SHADER_HEAPS read lock for the whole walk and calls HostHeap::slots_showing (descriptor/host.rs:3579) on each heap. That goes over every entry of kept and locks each slot's own Mutex;
  3. kept has count + extra entries (descriptor/host.rs:2501). For a view heap, dynamic_slots_for never makes extra smaller than DYNAMIC = 1 << 18 (descriptor/host.rs:2296, 2319-2345; on NVIDIA it is between 2^18 and 2^19). Sampler heaps get 0 (descriptor/host.rs:2413-2414). So every shader-visible view heap costs at least 262,144 mutex locks per pass;
  4. evict_slots then takes the SHADER_HEAPS read lock again and does a linear heaps.iter().any(..) for every slot in each victim's list (descriptor.rs:1757-1762).

The dynamic tail isn't wasted work. A dynamic slot that shows a candidate puts it in blocked/other (descriptor.rs:1723-1728), and that keeps the texture (descriptor.rs:1739-1741). So slots_showing can't just stop at count unless that information comes from somewhere else.

Heap creation (descriptor.rs:2189) and Drop for Heap (descriptor.rs:989) take SHADER_HEAPS.write(), so a thread making or dropping a heap waits for the whole walk in step 2. I haven't checked whether that happens during play.

Microbenchmark. This is a standalone release-build model of slots_showing: a Mutex<Option<_>> per slot, read the pointer, look it up in a HashSet of candidates. i7-13700KF, uncontended, warm caches, best of 20:

slots=  262144 filled=50% candidates= 2000  best of 20: 2.30 ms
slots=  524288 filled=50% candidates= 4000  best of 20: 4.61 ms
slots= 1048576 filled=50% candidates= 4000  best of 20: 9.22 ms
slots= 1310720 filled=50% candidates= 8000  best of 20: 11.59 ms

That's about 9 ns per slot, linear in the total slot count across heaps. At that rate 25-45 ms would mean roughly 3-5M slots in total. The other possibility is that the per-slot cost is much higher in the game (cold caches, slot mutexes shared with the recording threads, a slower laptop CPU). I haven't measured which. Two cheap things would settle it: log the total kept.len() across SHADER_HEAPS, and time evictable_slots on its own.

Counters nobody reads. SLOT_EVICT (resource.rs:3017) and SLOT_STATE (resource.rs:3026) are only written (fetch_add/store). Nothing in the repo loads them, so a play log can't show evictions (SLOT_EVICT[0]), slots reset ([2]), bad victims ([4]) or give-ups ([6]). (sampled::COLD is logged, but only with VICTORY_SAMPLED_MARKS=1, sampled.rs:203-219.) If those two were logged next to the SWEPT_US line, with a separate timer around slot_evict, 8 GB logs would show this without a custom build.

Minor: the doc comment at resource.rs:3035 still says VICTORY_SLOT_EVICT=1 is "off by default". Since 63b902f the launcher sets it (apps/victory/src/play.rs:123, scripts/play-foxhound.ps1:112). That commit is in both main and v2026.11.28.03.

cargo test --locked -p victory-gpu --lib slot_ passes (7 tests), but nothing there measures the cost of the walk.

Your first idea fits the code. A per-heap index from texture raw to the slots showing it, kept up to date where kept is written, would replace step 2 with lookups for the candidates only. It would have to carry the title/dynamic/indexed distinction so blocked and other still come out the same.

Update: the counters part is out of date. Current main (since 49cec75b, which brought in 0b6f6a5d, "Slot eviction: what it did is in the frame-rate lines") logs a slot eviction since the last line summary with the once-a-second frame-rate lines whenever eviction did something, so a normal play log on main now shows evictions and textures that came back. What it still doesn't show is slot_evict's own time: SWEPT_US is still recorded before slot_evict runs.

**@⁠kalberts0089-hash** on GitHub · 2026-11-29 08:00 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7252829849) · edited 2026-11-29 08:50 UTC I can't reproduce the timings (I can't run the game here, and my card is 12 GB), but I read the code at e1f2eb6 and it fits what you measured. Notes below, plus a microbenchmark of the slot walk. **Where it runs.** `sweep()` (`crates/victory-gpu/src/host.rs:524`) is called from `HostQueue::submit` (`host.rs:6283`) at the stage `"submit: the sweep"` (`host.rs:6389`, calls at `6399` and `6409`), before the submission counts as started. With `VICTORY_ASYNC_SUBMIT` that is the `victory-submit` thread (`queue/behind.rs:794`). **Why the logged number hides it.** `resource::let_go_idle` records `SWEPT_US` (`resource.rs:2966-2968`) *before* it calls `slot_evict` (`resource.rs:2972`). So the "looks for textures to let go, X ms each" line (`host.rs:10734-10739`) only covers the texture pass. **What `slot_evict` walks once the card is over its line** (it returns early when `need == 0`, `resource.rs:3170`, and when no idle candidate is found, `resource.rs:3204`): 1. every texture in `textures()`, taking `r.host.made` for each idle candidate (`resource.rs:3179-3203`); 2. `descriptor::evictable_slots` (`descriptor.rs:1693`) holds the `SHADER_HEAPS` read lock for the whole walk and calls `HostHeap::slots_showing` (`descriptor/host.rs:3579`) on each heap. That goes over **every** entry of `kept` and locks each slot's own `Mutex`; 3. `kept` has `count + extra` entries (`descriptor/host.rs:2501`). For a view heap, `dynamic_slots_for` never makes `extra` smaller than `DYNAMIC = 1 << 18` (`descriptor/host.rs:2296`, `2319-2345`; on NVIDIA it is between 2^18 and 2^19). Sampler heaps get 0 (`descriptor/host.rs:2413-2414`). So every shader-visible view heap costs at least 262,144 mutex locks per pass; 4. `evict_slots` then takes the `SHADER_HEAPS` read lock again and does a linear `heaps.iter().any(..)` for every slot in each victim's list (`descriptor.rs:1757-1762`). The dynamic tail isn't wasted work. A dynamic slot that shows a candidate puts it in `blocked`/`other` (`descriptor.rs:1723-1728`), and that keeps the texture (`descriptor.rs:1739-1741`). So `slots_showing` can't just stop at `count` unless that information comes from somewhere else. Heap creation (`descriptor.rs:2189`) and `Drop for Heap` (`descriptor.rs:989`) take `SHADER_HEAPS.write()`, so a thread making or dropping a heap waits for the whole walk in step 2. I haven't checked whether that happens during play. **Microbenchmark.** This is a standalone release-build model of `slots_showing`: a `Mutex<Option<_>>` per slot, read the pointer, look it up in a `HashSet` of candidates. i7-13700KF, uncontended, warm caches, best of 20: ``` slots= 262144 filled=50% candidates= 2000 best of 20: 2.30 ms slots= 524288 filled=50% candidates= 4000 best of 20: 4.61 ms slots= 1048576 filled=50% candidates= 4000 best of 20: 9.22 ms slots= 1310720 filled=50% candidates= 8000 best of 20: 11.59 ms ``` That's about 9 ns per slot, linear in the total slot count across heaps. At that rate 25-45 ms would mean roughly 3-5M slots in total. The other possibility is that the per-slot cost is much higher in the game (cold caches, slot mutexes shared with the recording threads, a slower laptop CPU). I haven't measured which. Two cheap things would settle it: log the total `kept.len()` across `SHADER_HEAPS`, and time `evictable_slots` on its own. **Counters nobody reads.** `SLOT_EVICT` (`resource.rs:3017`) and `SLOT_STATE` (`resource.rs:3026`) are only written (`fetch_add`/`store`). Nothing in the repo loads them, so a play log can't show evictions (`SLOT_EVICT[0]`), slots reset (`[2]`), bad victims (`[4]`) or give-ups (`[6]`). (`sampled::COLD` is logged, but only with `VICTORY_SAMPLED_MARKS=1`, `sampled.rs:203-219`.) If those two were logged next to the `SWEPT_US` line, with a separate timer around `slot_evict`, 8 GB logs would show this without a custom build. **Minor:** the doc comment at `resource.rs:3035` still says `VICTORY_SLOT_EVICT=1` is "off by default". Since 63b902f the launcher sets it (`apps/victory/src/play.rs:123`, `scripts/play-foxhound.ps1:112`). That commit is in both main and v2026.11.28.03. `cargo test --locked -p victory-gpu --lib slot_` passes (7 tests), but nothing there measures the cost of the walk. Your first idea fits the code. A per-heap index from texture raw to the slots showing it, kept up to date where `kept` is written, would replace step 2 with lookups for the candidates only. It would have to carry the title/dynamic/indexed distinction so `blocked` and `other` still come out the same. **Update:** the counters part is out of date. Current `main` (since 49cec75b, which brought in 0b6f6a5d, "Slot eviction: what it did is in the frame-rate lines") logs a `slot eviction since the last line` summary with the once-a-second frame-rate lines whenever eviction did something, so a normal play log on `main` now shows evictions and textures that came back. What it still doesn't show is `slot_evict`'s own time: `SWEPT_US` is still recorded before `slot_evict` runs.
Author
Owner

@⁠icdmkg2 on GitHub · 2026-11-29 08:07 UTC · original

@⁠kalberts0089-hash, thanks, that reading was spot on. I measured both things you named in the game, on the same laptop (RTX 5060 Laptop 8 GB, Ryzen 7 H 260, Windows 11), main at e1f2eb6 plus a throwaway probe in slot_evict. Release build, Series S, DLSS performance, the prologue's cell, about 85 s of play: 84 passes, one a second.

median range
total slots walked by evictable_slots 1,000,127 in 2 heaps constant
evictable_slots 19.0 ms 14.4–42.5 ms
per slot 19 ns (about 2× your 9 ns) 14–42 ns
texture scan before it (the textures() loop) 14.5 ms 8.8–25.7 ms
textures in the table 55,296 → 74,018 (growing)
idle candidates handed to evictable_slots 30,223 → 43,966
whole pass 34.2 ms 23.5–54.6 ms

So it's about a million slots at about twice the uncontended cost per slot, plus a texture scan nearly as long as the slot walk. The scan takes r.host.made for tens of thousands of idle candidates each second.

What it buys: almost nothing here. Over the 84 passes, slot eviction let go of 10 textures in total (6 → 16 since the start; slots reset 13 → 32, made again 1, bad victims 0, given up 0). Nearly every pass finds 30–44k candidates and lets go of 0–1, because almost all of them come back blocked (a slot shows them). So the submitting thread spends about 34 ms a second to free about one texture every eight seconds, and the card stays over its line.

That points to the index you and I both suggested (texture → slots showing it, kept up to date where kept is written): the per-second cost would scale with candidates, not with a million slots. And the scan could skip textures already known to be blocked until something changes their slots, instead of re-taking made for all of them every second. From my earlier A/B, it isn't the eviction itself that should be cut: slowing it down filled VRAM and made frames worse.

The probe is two AtomicU64s in evictable_slots and one info! line per pass in slot_evict. I can turn it into a proper log line next to the SWEPT_US one, with SLOT_EVICT / SLOT_STATE read out, as you suggested, if that's wanted in a PR.

**@⁠icdmkg2** on GitHub · 2026-11-29 08:07 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7252904181) @⁠kalberts0089-hash, thanks, that reading was spot on. I measured both things you named in the game, on the same laptop (RTX 5060 Laptop 8 GB, Ryzen 7 H 260, Windows 11), `main` at `e1f2eb6` plus a throwaway probe in `slot_evict`. Release build, Series S, DLSS performance, the prologue's cell, about 85 s of play: 84 passes, one a second. | | median | range | |---|---|---| | total slots walked by `evictable_slots` | **1,000,127 in 2 heaps** | constant | | `evictable_slots` | **19.0 ms** | 14.4–42.5 ms | | per slot | **19 ns** (about 2× your 9 ns) | 14–42 ns | | texture scan before it (the `textures()` loop) | **14.5 ms** | 8.8–25.7 ms | | textures in the table | 55,296 → 74,018 (growing) | | | idle candidates handed to `evictable_slots` | 30,223 → 43,966 | | | **whole pass** | **34.2 ms** | 23.5–54.6 ms | So it's about a million slots at about twice the uncontended cost per slot, plus a texture scan nearly as long as the slot walk. The scan takes `r.host.made` for tens of thousands of idle candidates each second. **What it buys: almost nothing here.** Over the 84 passes, slot eviction let go of **10 textures in total** (6 → 16 since the start; slots reset 13 → 32, made again 1, bad victims 0, given up 0). Nearly every pass finds 30–44k candidates and lets go of 0–1, because almost all of them come back `blocked` (a slot shows them). So the submitting thread spends about 34 ms a second to free about one texture every eight seconds, and the card stays over its line. That points to the index you and I both suggested (texture → slots showing it, kept up to date where `kept` is written): the per-second cost would scale with candidates, not with a million slots. And the scan could skip textures already known to be blocked until something changes their slots, instead of re-taking `made` for all of them every second. From my earlier A/B, it isn't the eviction itself that should be cut: slowing it down filled VRAM and made frames worse. The probe is two `AtomicU64`s in `evictable_slots` and one `info!` line per pass in `slot_evict`. I can turn it into a proper log line next to the `SWEPT_US` one, with `SLOT_EVICT` / `SLOT_STATE` read out, as you suggested, if that's wanted in a PR.
Author
Owner

@⁠kodifan on GitHub · 2026-11-29 12:45 UTC · original

Independent data on a 16 GB card with v2026.11.29.01 — and it shows the sweep has a second cost
after slot eviction is turned off.

Machine: RTX 5060 Ti 16 GB, Ryzen 7 7700, 32 GB DDR5-6000, Windows 11 26200, driver 621.24.
Series S and Series X, DLSS Performance, frame generation 2X, texture room 70, THIN=0,
ASYNC_SUBMIT=1, quiet logging (VICTORY_LOG=warn,victory_gpu::frame_times=info),
VICTORY_PROCESS_MEMORY=0. Frame times from VICTORY_BENCH_CSV (one row per frame: elapsed, ms,
draws), first 60 s dropped.

Series S (1280x720 scene -> 1920x1080 out, 3–4k draws):

frames >100 ms >200 ms spacing
VICTORY_SLOT_EVICT=1 (default) 231 of 10,415 (2.2 %) 85 1.0 s
VICTORY_SLOT_EVICT=0 no stutter felt; VRAM 10.9 / 14.9 GB – –

Series X (1280x720 scene -> 2560x1440 out, 8–16k draws), VICTORY_SLOT_EVICT=0:

1172 frames after warm-up, 75 over 100 ms (6.4 %)
gaps: 40 at 1.0 s, 18 at 1.1 s
frames: 160–373 ms, at 13–16k draws
VRAM 11.8 / 14.4 GB, SHARED 6.7 GB, free system RAM 1.7 / 31 GB

So on a 16 GB card SLOT_EVICT=0 fixes the low-draw case but not the high-draw one: the 1 s pass is
still there, and its cost grows with the texture table / draw count (your 14.5 ms at 55–74k textures
becomes 160–373 ms here at 15k draws). That points at the sweep's texture scan as the remaining cost
after slot eviction is off — so moving the whole sweep off the submitting thread, or making its
texture pass incremental, looks like the fix rather than only resting slot_evict.

Happy to run a specific A/B on request (Series X, SLOT_EVICT=1 vs 0, same save, per-frame CSV).

**@⁠kodifan** on GitHub · 2026-11-29 12:45 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7256042549) Independent data on a **16 GB** card with v2026.11.29.01 — and it shows the sweep has a second cost after slot eviction is turned off. **Machine:** RTX 5060 Ti 16 GB, Ryzen 7 7700, 32 GB DDR5-6000, Windows 11 26200, driver 621.24. Series S and Series X, DLSS Performance, frame generation 2X, texture room 70, `THIN=0`, `ASYNC_SUBMIT=1`, quiet logging (`VICTORY_LOG=warn,victory_gpu::frame_times=info`), `VICTORY_PROCESS_MEMORY=0`. Frame times from `VICTORY_BENCH_CSV` (one row per frame: elapsed, ms, draws), first 60 s dropped. **Series S** (1280x720 scene -> 1920x1080 out, 3–4k draws): | | frames >100 ms | >200 ms | spacing | |---|---|---|---| | `VICTORY_SLOT_EVICT=1` (default) | 231 of 10,415 (2.2 %) | 85 | 1.0 s | | `VICTORY_SLOT_EVICT=0` | no stutter felt; VRAM 10.9 / 14.9 GB | – | – | **Series X** (1280x720 scene -> 2560x1440 out, 8–16k draws), `VICTORY_SLOT_EVICT=0`: ``` 1172 frames after warm-up, 75 over 100 ms (6.4 %) gaps: 40 at 1.0 s, 18 at 1.1 s frames: 160–373 ms, at 13–16k draws VRAM 11.8 / 14.4 GB, SHARED 6.7 GB, free system RAM 1.7 / 31 GB ``` So on a 16 GB card `SLOT_EVICT=0` fixes the low-draw case but not the high-draw one: the 1 s pass is still there, and its cost grows with the texture table / draw count (your 14.5 ms at 55–74k textures becomes 160–373 ms here at 15k draws). That points at the sweep's texture scan as the remaining cost after slot eviction is off — so moving the whole sweep off the submitting thread, or making its texture pass incremental, looks like the fix rather than only resting `slot_evict`. Happy to run a specific A/B on request (Series X, `SLOT_EVICT=1` vs `0`, same save, per-frame CSV).
Author
Owner

@⁠Machad3x on GitHub · 2026-11-29 12:46 UTC · original

Same symptom on a 12 GB card (RTX 3080 Ti, 1080-to-1440, Series X, main 829188e9, diagnostics build, ~5 min from boot into the prologue, card over its line: VRAM 10.2 to 11.3 GB). I timed each step of sweep() and logged any step over 2 ms (about 290 sweeps):

step sweeps over 2 ms max total
resource::let_go_idle 209 101 ms 13.0 s
pressure trims (trim_spare_uploads, trim_spare_chunks, trim_read_backs, send::trim) 179 124 ms 2.6 s
pool::room 1 2.8 ms 0

So let_go_idle averages about 62 ms in 209 of ~290 sweeps. The timeline recorder (VICTORY_TIMELINE) agrees: one sweep of 59.75 ms inside a 62 ms frame (submit: the sweep was the largest item of that frame, 19.9 ms averaged over the 3 recorded frames). The log line says: sweeps with a limit since the start (card over its line): 198, asked to let go 206432 MB, let go 4623 MB, 12024890 old enough copies looked at, about 60k copies looked at per sweep for 2% of the bytes asked.

Not a fix: I did not change the sweep, since the A/B in this issue shows resting the pass makes frames worse. It does mean the 8 GB framing is not needed to hit it; any card whose line is crossed pays it. #2075's per-second cost line would make this visible without a custom build.

**@⁠Machad3x** on GitHub · 2026-11-29 12:46 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7256050144) Same symptom on a **12 GB** card (RTX 3080 Ti, 1080-to-1440, Series X, `main` 829188e9, diagnostics build, ~5 min from boot into the prologue, card over its line: VRAM 10.2 to 11.3 GB). I timed each step of `sweep()` and logged any step over 2 ms (about 290 sweeps): | step | sweeps over 2 ms | max | total | |---|---|---|---| | `resource::let_go_idle` | 209 | 101 ms | 13.0 s | | pressure trims (`trim_spare_uploads`, `trim_spare_chunks`, `trim_read_backs`, `send::trim`) | 179 | 124 ms | 2.6 s | | `pool::room` | 1 | 2.8 ms | 0 | So `let_go_idle` averages about 62 ms in 209 of ~290 sweeps. The timeline recorder (`VICTORY_TIMELINE`) agrees: one sweep of 59.75 ms inside a 62 ms frame (`submit: the sweep` was the largest item of that frame, 19.9 ms averaged over the 3 recorded frames). The log line says: `sweeps with a limit since the start (card over its line): 198, asked to let go 206432 MB, let go 4623 MB, 12024890 old enough copies looked at`, about 60k copies looked at per sweep for 2% of the bytes asked. Not a fix: I did not change the sweep, since the A/B in this issue shows resting the pass makes frames worse. It does mean the 8 GB framing is not needed to hit it; any card whose line is crossed pays it. #2075's per-second cost line would make this visible without a custom build.
Author
Owner

@⁠Machad3x on GitHub · 2026-11-29 12:53 UTC · original

A/B on the same 12 GB card and scene (about 5 min from boot into the prologue, card over its line, victory play, 1080-to-1440), only VICTORY_SLOT_EVICT changed:

slot evict on (play's default) VICTORY_SLOT_EVICT=0
let_go_idle per sweep mean 62 ms, max 101 mean 34 ms, max 56
time in the sweep over the run 13.0 s 7.4 s
frame time, median / p95 (5 s lines) 54.8 / 105 ms 52.1 / 74 ms
VRAM / RAM private (median) 10.8 / 28.4 GB 10.6 / 28.4 GB

In the on run the eviction let go 0 textures (0 MB) all the way (textures let go with their slots under pressure ... since the start: 0 textures) while looking at 46-52k idle-looking textures each second. So on this card the slot walk costs about 28 ms per sweep and returns nothing. It is one run each, with a slightly different scene mix (3800 vs 3365 draws/frame median), so treat the frame numbers as indicative; the let_go_idle step times are the solid part. The remaining 34 ms with eviction off is the other loop in let_go_idle (about 60k copies looked at per sweep, 12 M over 198 limited sweeps). Both stay on the submitting thread.

**@⁠Machad3x** on GitHub · 2026-11-29 12:53 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7256137375) A/B on the same 12 GB card and scene (about 5 min from boot into the prologue, card over its line, `victory play`, 1080-to-1440), only `VICTORY_SLOT_EVICT` changed: | | slot evict on (play's default) | `VICTORY_SLOT_EVICT=0` | |---|---|---| | `let_go_idle` per sweep | mean 62 ms, max 101 | mean 34 ms, max 56 | | time in the sweep over the run | 13.0 s | 7.4 s | | frame time, median / p95 (5 s lines) | 54.8 / 105 ms | 52.1 / 74 ms | | VRAM / RAM private (median) | 10.8 / 28.4 GB | 10.6 / 28.4 GB | In the `on` run the eviction let go **0 textures (0 MB)** all the way (`textures let go with their slots under pressure ... since the start: 0 textures`) while looking at 46-52k idle-looking textures each second. So on this card the slot walk costs about 28 ms per sweep and returns nothing. It is one run each, with a slightly different scene mix (3800 vs 3365 draws/frame median), so treat the frame numbers as indicative; the `let_go_idle` step times are the solid part. The remaining 34 ms with eviction off is the other loop in `let_go_idle` (about 60k copies looked at per sweep, 12 M over 198 limited sweeps). Both stay on the submitting thread.
Author
Owner

@⁠HailLucifer666 on GitHub · 2026-11-29 18:36 UTC · original

Opened #2720 (rebased on \ 2026.11.29.01/\

**@⁠HailLucifer666** on GitHub · 2026-11-29 18:36 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7260617871) Opened #2720 (rebased on \ 2026.11.29.01\/\
Author
Owner

@⁠Yoruiopz on GitHub · 2026-11-30 07:26 UTC · original · edited 2026-11-30 07:37 UTC

Independent reproduction on an RTX 5070 Laptop GPU (8 GB), Core Ultra 9 275HX, 64 GB RAM, Windows 11. I ran a diagnostics build from 41adb551 with the Series X 1080p startup change in #3774 and submit-sweep timers. Series X at 1920×1080 output, DLSS Performance, 2× DLSS FG, and a 15 rendered FPS cap. Slot eviction remained enabled. This is the control run with idle-sweep slicing disabled.

Time after first present Median draws Sweeps Whole submit sweep, median / p95 Slot eviction, median / p95 Rendered frames ≥95 ms overlapping a sweep
90–130 s 7,613 38 36.78 / 41.02 ms 27.56 / 30.56 ms 8 of 11
211–245 s 4,875 33 34.69 / 39.60 ms 25.34 / 29.07 ms 29 of 30

The measured late window had a 66.62 ms median and a 100.06 ms p95 rendered interval. I aligned the present CSV to cumulative frame-log intervals before pairing the sweep timestamps. The largest alignment residual was 0.027 ms.

The last sweep saw 26,157 idle candidates, all blocked by indexed slots. It recorded zero texture evictions and zero descriptor resets over the run. Local VRAM was around 6.6 GB against a roughly 7.0 GB WDDM budget in the heavy window. This supports the diagnosis that the lookup itself is expensive on a second 8 GB mobile GPU. The smaller streamed-out scan and ordinary texture reclaim timings leave room for improvement, but the descriptor scan is the largest measured cost here. #2720 and #3750 target that cost in different ways. These numbers establish the baseline for testing those changes.

A second run with finer instrumentation counted 38 eviction passes in the 90–130 s window. Each walked 1,000,127 slots across two heaps. The median pass matched 25,432 slots and found zero eligible textures, zero resets, and zero evictions. Median times were 3.33 ms to enumerate texture candidates, 16.53 ms inside HostHeap::slots_showing, 5.98 ms for the remainder of descriptor matching, and 0.61 ms for selection/accounting/apply. The scan dominates here, and the remaining descriptor cost is large enough to measure separately.

**@⁠Yoruiopz** on GitHub · 2026-11-30 07:26 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7271743975) · edited 2026-11-30 07:37 UTC Independent reproduction on an RTX 5070 Laptop GPU (8 GB), Core Ultra 9 275HX, 64 GB RAM, Windows 11. I ran a diagnostics build from `41adb551` with the Series X 1080p startup change in #3774 and submit-sweep timers. Series X at 1920×1080 output, DLSS Performance, 2× DLSS FG, and a 15 rendered FPS cap. Slot eviction remained enabled. This is the control run with idle-sweep slicing disabled. | Time after first present | Median draws | Sweeps | Whole submit sweep, median / p95 | Slot eviction, median / p95 | Rendered frames ≥95 ms overlapping a sweep | | --- | ---: | ---: | ---: | ---: | ---: | | 90–130 s | 7,613 | 38 | 36.78 / 41.02 ms | 27.56 / 30.56 ms | 8 of 11 | | 211–245 s | 4,875 | 33 | 34.69 / 39.60 ms | 25.34 / 29.07 ms | 29 of 30 | The measured late window had a 66.62 ms median and a 100.06 ms p95 rendered interval. I aligned the present CSV to cumulative frame-log intervals before pairing the sweep timestamps. The largest alignment residual was 0.027 ms. The last sweep saw 26,157 idle candidates, all blocked by indexed slots. It recorded zero texture evictions and zero descriptor resets over the run. Local VRAM was around 6.6 GB against a roughly 7.0 GB WDDM budget in the heavy window. This supports the diagnosis that the lookup itself is expensive on a second 8 GB mobile GPU. The smaller streamed-out scan and ordinary texture reclaim timings leave room for improvement, but the descriptor scan is the largest measured cost here. #2720 and #3750 target that cost in different ways. These numbers establish the baseline for testing those changes. A second run with finer instrumentation counted 38 eviction passes in the 90–130 s window. Each walked 1,000,127 slots across two heaps. The median pass matched 25,432 slots and found zero eligible textures, zero resets, and zero evictions. Median times were 3.33 ms to enumerate texture candidates, 16.53 ms inside `HostHeap::slots_showing`, 5.98 ms for the remainder of descriptor matching, and 0.61 ms for selection/accounting/apply. The scan dominates here, and the remaining descriptor cost is large enough to measure separately.
Author
Owner

@⁠trustno1-coder on GitHub · 2026-11-30 15:41 UTC · original

Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is v2026.11.30.01.

If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run:

  1. The play log: the newest victory-nvidia-play-<date>-<time>-<number>.log in %LOCALAPPDATA%\victory\logs\.
  2. The crash log: %LOCALAPPDATA%\VIctory\data\7952987A\crashes.log, plus the newest .crash.log in %LOCALAPPDATA%\VIctory\data\7952987A\temp\ if there is one from that run.
**@⁠trustno1-coder** on GitHub · 2026-11-30 15:41 UTC · [original](https://github.com/trustno1-coder/VIctory-NVIDIA/issues/1644#issuecomment-7283416213) Closing this because it was opened before v2026.11.29.01, and a great deal has changed since then. The latest release is [v2026.11.30.01](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.30.01). If this still happens, or still applies, on the latest release, please open a new issue. For a bug, attach both logs from that run: 1. The play log: the newest `victory-nvidia-play-<date>-<time>-<number>.log` in `%LOCALAPPDATA%\victory\logs\`. 2. The crash log: `%LOCALAPPDATA%\VIctory\data\7952987A\crashes.log`, plus the newest `.crash.log` in `%LOCALAPPDATA%\VIctory\data\7952987A\temp\` if there is one from that run.
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/trustno1-coder--VIctory-NVIDIA#1644
No description provided.