Pool: what the texture blocks hold, in the log every five seconds (VICTORY_POOL_STATS=1, off by default) #79

Closed
1mosce wants to merge 1 commit from upstream-pr/79 into main
1mosce commented 2026-11-27 17:08:11 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by 1mosce on 2026-11-27T17:08:11Z.


What

VICTORY_POOL_STATS=1 (off by default) writes one line about the texture pool every five seconds: the blocks and how full they are (in quarters), the bytes free now and in how many ranges, the largest of those, the pieces that rest, the live textures by the size of their piece, and what the small ones would hold at multiples of 4 KiB (VICTORY_POOL_SMALL).

Nothing about how pieces are cut changes. Without the switch a texture costs two counters when it is made and when it goes; with it, one more GetResourceAllocationInfo for each texture made.

Why

the texture queue's room says how much of the blocks is free, not how it lies or why. On an 8 GiB card that was the difference between "the pool is fragmented" and "small textures take 64 KiB each", which need different fixes.

What it showed

RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS, 32 GB, Series S profile, DLSS Balanced, no frame generation.

Five minutes into a run with VICTORY_POOL_SMALL=0 (the launcher's setting):

  • 57 blocks (3,648 MB) for 2,387 MB of textures; 1,260 MB of them free in 1,655 ranges; 25 blocks less than half full and none empty, so none goes back to the card;
  • 13,363 of 15,836 live textures in pieces of 64 KiB; 13,748 could lie at multiples of 4 KiB and would hold 222 MB where they held 907 MB.

With VICTORY_POOL_SMALL=1 the next run, six minutes: 20,000 to 38,000 live textures in 40 to 45 blocks (2,560 to 2,880 MB), 2,024 MB held on average, the card 560 to 780 MB under its budget, 2 % of the queue's slots held back for room where the run before had 9 %, and no device loss. That is one run on one NVIDIA card; I am not proposing to change the launcher's default on it.

Tests

the_census_counts_what_is_free_resting_and_how_full_blocks_are, textures_are_counted_by_their_piece. cargo test -p victory-gpu --lib pool:: passes (9 tests); clippy has no warning in pool.rs, plain and with diagnostics.

CI: on main (d12eb1b) cargo clippy --workspace --all-targets -- -D warnings stops at crates/victory-formats/src/texture.rs:1346 (clippy::precedence), and two tests fail on this machine with and without this change: indirect::tests::host_list_budget_starts_empty_at_each_submission and indirect::tests::warp_batch_charges_every_execution.

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:issue:5530421835 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/79). Originally posted by [1mosce](https://github.com/1mosce) on 2026-11-27T17:08:11Z. --- ## What `VICTORY_POOL_STATS=1` (off by default) writes one line about the texture pool every five seconds: the blocks and how full they are (in quarters), the bytes free now and in how many ranges, the largest of those, the pieces that rest, the live textures by the size of their piece, and what the small ones would hold at multiples of 4 KiB (`VICTORY_POOL_SMALL`). Nothing about how pieces are cut changes. Without the switch a texture costs two counters when it is made and when it goes; with it, one more `GetResourceAllocationInfo` for each texture made. ## Why `the texture queue's room` says how much of the blocks is free, not how it lies or why. On an 8 GiB card that was the difference between "the pool is fragmented" and "small textures take 64 KiB each", which need different fixes. ## What it showed RTX 4070 Laptop (8 GiB), Ryzen 9 8945HS, 32 GB, Series S profile, DLSS Balanced, no frame generation. Five minutes into a run with `VICTORY_POOL_SMALL=0` (the launcher's setting): - 57 blocks (3,648 MB) for 2,387 MB of textures; 1,260 MB of them free in 1,655 ranges; 25 blocks less than half full and none empty, so none goes back to the card; - 13,363 of 15,836 live textures in pieces of 64 KiB; 13,748 could lie at multiples of 4 KiB and would hold 222 MB where they held 907 MB. With `VICTORY_POOL_SMALL=1` the next run, six minutes: 20,000 to 38,000 live textures in 40 to 45 blocks (2,560 to 2,880 MB), 2,024 MB held on average, the card 560 to 780 MB under its budget, 2 % of the queue's slots held back for room where the run before had 9 %, and no device loss. That is one run on one NVIDIA card; I am not proposing to change the launcher's default on it. ## Tests `the_census_counts_what_is_free_resting_and_how_full_blocks_are`, `textures_are_counted_by_their_piece`. `cargo test -p victory-gpu --lib pool::` passes (9 tests); clippy has no warning in `pool.rs`, plain and with `diagnostics`. CI: on `main` (d12eb1b) `cargo clippy --workspace --all-targets -- -D warnings` stops at `crates/victory-formats/src/texture.rs:1346` (`clippy::precedence`), and two tests fail on this machine with and without this change: `indirect::tests::host_list_budget_starts_empty_at_each_submission` and `indirect::tests::warp_batch_charges_every_execution`.
trustno1-coder commented 2026-11-28 02:48:58 +00:00 (Migrated from github.com)

Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-11-28T02:48:58Z.


Merged into main (8fc2254) and shipped in v2026.11.27.10. The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

<!-- greyfinch-sync:trustno1-coder/VIctory-NVIDIA:comment:7232611688 --> Imported from [trustno1-coder/VIctory-NVIDIA](https://github.com/trustno1-coder/VIctory-NVIDIA/pull/79#issuecomment-7232611688). Originally posted by [trustno1-coder](https://github.com/trustno1-coder) on 2026-11-28T02:48:58Z. --- Merged into main (8fc2254) and shipped in [v2026.11.27.10](https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.10). The commit keeps you as its author, so it counts toward the contributors list. GitHub shows this as closed rather than merged only because the commits were applied on top of the newest main (new commit IDs). Thank you!

Pull request closed

Sign in to join this conversation.
No reviewers
No labels
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.

Reference
trustno1-coder/VIctory-NVIDIA!79
No description provided.