Memory grows through a session on 32 GB PCs and the frame rate halves; pull request #58 fixes it (measured) #191
Labels
No labels
accessibility
bug
documentation
duplicate
enhancement
good first issue
help wanted
invalid
question
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA#191
Loading…
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
@JohnTitor2003 on GitHub · 2026-11-27 19:29 UTC · original
victory-nvidia-issue191-logs.zip
On a 32 GB PC the layer's memory climbs for as long as the game runs, and the frame rate falls with it. Pull request #58 stops it. I'm opening this so it is visible outside the pull request queue, since every release so far ships with the growth.
PC: RTX 5080 16 GB (driver 617.42), Ryzen 9 7950X, 32 GB RAM, Windows 11. Built from source at
d12eb1b2. Series X profile, 2560x1440, DLSS Quality, frame generation off, launcher defaults.Private bytes of victory.exe (typeperf, every 2 s):
d12eb1b2)The fix is Vice-Tay's and project-flamingo's work, submitted here by regiumlepidi as #58 (placed views ignore the padding words; ownerless view entries are capped). I ran those commits plus the one #58 left out because of a conflict (18bc367, the shape index keyed by the shape's hash); the conflict is one hunk and the resolution is described in my comment on #58: #58
As far as I can see nothing on main since
d12eb1b2touchescrates/victory-gpu/src/descriptor.rs, so the current release (v2026.11.27.3) still has the growth. On a 32 GB PC that is the difference between about 15 good minutes and a whole session.Tested and written with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@SwitchD3v on GitHub · 2026-11-27 19:45 UTC · original
Same growth here on another 32 GB PC, with a memory map from the diagnostics build. It suggests the growth has a second part besides the view table that #58 fixes.
PC: RTX 3080 Ti 12 GB (driver 621.14), Ryzen 7 5800X, 32 GB RAM + 32 GB pagefile, Windows 11 26200. Built from source at
0cef07e, diag profile for this run (the release build grows the same way). Series X, 2560x1440, DLSS Quality, no frame generation, launcher defaults.Growth: private bytes 21.2 -> 26.7 GB over 7.6 min of play (0.73 GB/min) in this run. In an earlier ~50 min release run it went from 25 to 39 GB: the PC's commit charge reached 61-62 of 64 GB and frames fell to 6-8 fps from about 20 while Windows paged. Turning DLSS off didn't change the climb. It stops while the title's pause menu is open.
Memory map, first vs last of the run (
copystat: memory map, committed MB with resident MB in brackets):Biggest groups at the start: 9 x 64 MB write-combined and 14 x 32 MB write-combined. At the end:
So most of the growth here is 64 MB and 32 MB write-combined buffers: 11.5 GB committed, only 1.9 GB of it resident. They look kept rather than used.
The ~4 GB in "other private allocations of 1 MB and more" may be the view table that #58 caps. The write-combined part seems separate. FlaMeCr0Wn/opti-vicity 93fe207 ("Idle spare send buffers go after 30 s",
VICTORY_SEND_IDLE_S) releases idle spare send buffers, but it keeps up to 768 MiB of them, and the growth here is ~10 GB. So something else holds these buffers, or idle buffers aren't being released at all.Minor: after closing the window, the diag build's process didn't exit within 60 s and had to be ended.
I have the play log (38 memory-map lines over the run), a CSV every 5 s of fps, draws, private/commit memory, CPU/GPU/VRAM, and the system details. Happy to share any of them, or to run a build with #58 (and/or a send-buffer cap) for a before/after. No crashes, no game files.
Tested and written with an AI assistant (Claude Code); the runs were on my machine.
@KaV3R on GitHub · 2026-11-27 19:46 UTC · original
Same slowdown here on a PC with plenty of RAM, so paging isn't the whole story. The layer's own timings show where the time goes.
PC: RTX 4070 SUPER 12 GB (driver 621.35), Ryzen 9 9950X3D, 62 GB RAM, Windows 11 26300. Release build at
29d8dbf, Series X, 2560x1440, DLSS Quality, frame generation 2x, launcher defaults.Frame rate (rendered): 15-17 fps for the first ~20 min, then 11-12, and 7-9 after ~50 min, at similar draw counts (5-7k a frame). Three runs this way, with and without frame generation. A fresh start is back at 15-19.
What grows (frame-rate lines, 19:05 vs 19:40 in the same run):
VICTORY_LATE_WAIT=2)The landing threads wait on the shadow's
merginglock (land_card/land_backin shadow.rs) whilemerge_under_writesholds it for writing. Both costs grow over the session, while the amount of work (pieces landed, pages, MB) only grows ~1.3x. It looks like a structure that one of these walks gets longer over time, rather than more work per frame. I couldn't pin down which one by reading the code.VRAM: the texture queue stays at its line (~8.7 of 8.5 GB with frame generation's reserve).
Next here: a run with
VICTORY_LATE_WAIT=1, to see whether the slowdown goes away without the exact merge under writes. I'll post the result. Happy to run #58 too, or a build with extra counters.AI-assisted (Claude Code): the analysis and this text. The runs were on my machine; no game files.
@gilshahar7 on GitHub · 2026-11-27 20:05 UTC · original
Can confirm, also getting a slowdown after ~20 mins in the game
32gb ram
@StebanSchrader on GitHub · 2026-11-27 20:37 UTC · original
A data point from a 16 GB laptop, where the growth ends the run within minutes instead of slowing it down. Here the limit is the memory Windows lets the card use in the PC's RAM, not the commit charge.
PC: RTX 4070 Laptop 8 GB (driver 32.0.16.1091), Ryzen 7 7840HS, 16 GB RAM (2 x 8 GB, not upgradable for me), Windows 11 26200. VIctory-NVIDIA
d12eb1bwith #58 applied locally (it applies cleanly, the descriptor tests pass).PLAY_FRAMEGEN.cmd 3: Series S, DLSS Quality, frame generation 2x, launcher defaults. Release build for most runs, diag profile for the memory maps.What happens: every run so far ended after 2 to 8 minutes of play with
0x8007000E(E_OUTOFMEMORY): first thousands ofno upload buffer/no shared buffer/no read-back bufferwarnings (76,639 in the last run), thena host command list did not closeor a device removal. At start the layer reports both budgets at 7180 MB: the card's own and the PC memory shared with the card (half of the RAM). RAM itself was not exhausted:physical_free_mibabout 3,000 andavailable_commit_mibover 20,000 at the time.Memory map (diag,
copystat), start of play -> crash, about 7 minutes:On the card side: the texture queue's line (80 % of the budget) does not hold the card's use: it went to 7.1 GB of a 7.0 GB budget (
no room, new textures wait), and the card copies of title buffers went from 850 MB to about 105 MB, so more buffer copies end up in shared memory. NeitherVICTORY_TEXTURE_ROOM_PERCENT=70norVICTORY_LEVELS_ON_DEMAND=1changed that (the second also garbled textures on faces).VICTORY_INPLACE=1: only 87 windows (412 MB) could be opened in place; 1853 were turned down as view memory (the page pool). The run still ran out after about 6 minutes, with the same memory map.So on 16 GB the shared-memory segment (about 8 GB) is the wall, and the 64/32 MB write-combined buffers plus the window copies fill it with frame generation on. A cap or reuse of those write-combined buffers, or keeping more of the buffer copies on the card, looks like what would make 16 GB PCs playable. Happy to run a build with a cap and post the before/after with the same memory map.
Tested with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@trustno1-coder on GitHub · 2026-11-27 20:59 UTC · original
Thanks for the report. v2026.11.27.6 is out (https://github.com/trustno1-coder/VIctory-NVIDIA/releases/tag/v2026.11.27.6). Since this was posted, releases from v2026.11.27.4 on include:
If you have time, please try .6 and post new numbers or a new log here. It helps to see what changed on your PC.
@BlackBookOfficial on GitHub · 2026-11-27 21:20 UTC · original
Just to clarify: these diagnostic results are already from v2026.11.27.6, the version you recommended.
The excessive memory growth is still present with the latest fixes, including PR #58 and PR #88.
During a 6.5-minute diagnostic run:
A subsequent run reached 38.9 GB private memory and was still increasing when I stopped it.
PR #58 appears to have successfully addressed descriptor retention, with the view table now measuring approximately 18 MB. However, the remaining memory growth is dominated by host texture allocations, shadow copies, staging buffers, and potentially retained guest-section commitments.
The diagnostics also identified approximately 5.15 GB of host texture copies whose title memory was no longer mapped and which had no visible descriptor reference.
An experimental reclamation sweep stabilized private memory around 32 GB, but introduced a performance regression and was reverted.
The issue is therefore still reproducible on v2026.11.27.6 and appears separate from the descriptor leak and ray-tracing arena issue.
I'd appreciate keeping this remaining host-memory retention problem tracked, as it continues to make longer gameplay sessions unstable on a 64 GB RAM system.
@StebanSchrader on GitHub · 2026-11-27 22:52 UTC · original
Tried it as asked: main at
df2daaf(v2026.11.27.6 plus the launch fixes after it), diag profile, same PC (RTX 4070 Laptop 8 GB, Ryzen 7 7840HS, 16 GB RAM), samePLAY_FRAMEGEN.cmd 3(Series S, DLSS Quality, frame generation 2x), launcher defaults.Result: same end, about 6.5 minutes after world entry (9 minutes after start):
a host command list did not close (0x8007000E). One difference: nono upload buffer/no shared bufferwarnings this time (76,639 in the last run ond12eb1b), it went straight to the list that did not close. At that moment the PC memory shared with the card was at 7151 of 7180 MB, the card at 6507 of 7114 MB, and the PC had 290 MB free.Memory map (diag,
copystat), before world entry -> last map before the crash:d12eb1b+ #58)So v2026.11.27.6 does not change the picture on 16 GB: the shared-memory segment (half the RAM) fills with the 64/32 MB write-combined buffers plus the window copies, with frame generation on. Happy to run a build with a cap on those buffers and post the same map.
Tested with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@trustno1-coder on GitHub · 2026-11-28 00:42 UTC · original
Thanks both, that's very useful. v2026.11.27.8 has another fix aimed at this: textures the game let go of are no longer checked every frame, and that check grew with the session. When you have time, please measure again on .8. The numbers in your format are ideal. I'm keeping this open until long sessions stay flat.
@StebanSchrader on GitHub · 2026-11-28 01:14 UTC · original
Measured again on
a4d05e7(v2026.11.27.9, so .8 included), diag profile, same PC (RTX 4070 Laptop 8 GB, Ryzen 7 7840HS, 16 GB RAM), samePLAY_FRAMEGEN.cmd 3(Series S, DLSS Quality, frame generation 2x).One difference from what you asked: this run also had three memory switches on, to try them on 16 GB at the same time:
VICTORY_WINDOW_KB=1024andVICTORY_WINDOW_TAILS=1(what #321 sets on 16 GB PCs) andVICTORY_ALLOCATOR_TRIM=1. So it is not a plain .8 run.Result:
a host command list did not close (0x8007000E)after 7.6 minutes, about 5.5 minutes after world entry (9.3 and 6.5 on .6 without the switches). At the end the PC memory shared with the card was at 7288 of 7180 MB, the card at 5799 of 7021 MB, the PC had 279 MB free.Memory map (diag,
copystat):copystat: memory)VICTORY_ALLOCATOR_TRIM=1the host lists alive went from 1548 to 1460, and the write-combined total did not move much.So on this PC neither .8's fix nor these three switches keep the shared segment (half of 16 GB) from filling: the write-combined 64/32 MB buffers that appear at world entry take about 7 GB of it on their own. I can run a plain .8/.9 run without the switches if that is more useful to you.
Tested with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@StebanSchrader on GitHub · 2026-11-28 01:40 UTC · original
A correction to my two reports above, with a better count. I said the 64/32 MB write-combined buffers fill the shared segment as if they were their own kind of buffer. They are not: they are how the driver groups our buffers. I added a local diagnostics-only count (not in this repo) to
upload_buffer,shared_buffer_nowandread_back_bufferinhost.rs: each buffer is counted by the line that asked for it (#[track_caller]) until it is released (an object in its private data). Same PC (RTX 4070 Laptop 8 GB, 16 GB RAM),a4d05e7(v2026.11.27.9), mode 3, no extra switches.Last count before the crash (
0x8007000E, 8 minutes after start; PC memory shared with the card at 7203 of 7180 MB):shadow.rs:5779(windows of title memory)shadow.rs:5455(lookup)ahead.rs:155send.rs:152host.rs:2312pool.rs:396(texture staging blocks)Windows (
shadow.rs:5779) over the run:So it is not a slow leak here. The windows' working set alone is about half of the 7.2 GB segment, and the next step up does not fit. On this card
window_card_mostis 0 (budget 7180 MB, under 8 GiB), and the card was at 6.3 of 7.0 GB anyway. What would help 16 GB PCs is fewer bytes per window in shared memory, or windows over title memory without a copy (VICTORY_INPLACErefused the 1,853 that lie in the page pool's views last time).Tested with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@JohnTitor2003 on GitHub · 2026-11-28 01:43 UTC · original
Measured on .8 as asked, on the 32 GB PC from the first post. Short version: no growth like before and no slowdown in 32 minutes uncapped; a slow creep is still visible in a 50-minute capped session.
Setup: v2026.11.27.8 built from source at
64d4931, unmodified. RTX 5080 16 GB (driver 617.42), Ryzen 9 7950X, 32 GB RAM, Windows 11. Series S profile, 2560x1440, DLSS Performance (VICTORY_DLSS_PRESET=m), water light off, started throughscripts\play-nvidia.ps1. Open-world free roam on foot and by car. Private bytes from typeperf every 2 s; frame figures from the log's frame lines (rendered frames).Run A: no frame cap, 32 minutes (frame generation switched between off, 2x, 3x and 6x in F1 during the run)
Rendered fps (median) at equal scene load:
"Preparing" stayed at 29-32 ms a frame throughout. 311 frame lines in the world, median 21.7 fps, 3 under 12.
Run B: 15 fps cap (
VICTORY_FRAME_INTERVAL_US=66667), frame generation 3x, 50 minutesThe cap held in 97% of the frame lines, so the frame rate cannot show a drag here, but the per-frame work can. At 6,000-8,000 draws, by ten-minute block: "preparing" 28.1, 29.6, 36.7, 37.4, 33.8 ms; "copying back" 4.2, 4.3, 6.2, 7.5, 5.1 ms. So a rise of about 9 ms between minutes 20 and 40 that eased afterwards. Run A stopped at 32 minutes, so it does not cover that window uncapped.
For comparison, the same PC on
d12eb1b2(first post, Series X): 27.5 GB at 4 minutes, 35.1 GB at 20, and 28-29 fps falling to 14.Caveats: one run each; free roam, so the scenes differ between blocks (hence the comparison at equal draw counts); A and B differ in cap and in frame generation.
Two other things seen on .8, not about memory; I can open separate issues with captures if useful:
scripts\play-nvidia.ps1with a fresh cache: first start without Jason's head, second start at a flat 14.0 fps for the whole run, third start normal (the warm-up restart is invictory playonly).d12eb1b2.Tested and written with an AI assistant (Claude Code); the runs were on my machine. No game files attached.
@StebanSchrader on GitHub · 2026-11-28 01:59 UTC · original
One more data point, in case someone looks at reading the windows in place instead of copying them. Same PC (RTX 4070 Laptop 8 GB, 16 GB RAM),
a4d05e7(v2026.11.27.9), mode 3, diag profile.What I tried (local change, not a PR): I let renderer port 1's placement (
port.rs: our own view of the section, thenOpenExistingHeapFromAddress1) take windows outside buffers at any address, not only below 4 GiB. It was behind a switch, opened only the window's own pages, and fell back to a copy when refused. The port and in-place tests pass on WARP, includingwarp_a_stretch_of_a_reserved_section_is_used_in_place_through_a_view_of_ours.Result: only 4 windows (16 MB) could be placed. Almost every other window was turned down by
stretch()before anything was asked of the host:not one stretch of a section: Holes: views cover only part of the 4 MiB window;not one stretch of a section: None: no view holds its first byte.At the end there were 1193 windows copied (5040 MB,
shadow.rs:5779), and the PC memory shared with the card was at 7433 of 7180 MB. The run ended at 6.5 minutes with a device removal (0x887A0005) rather than0x8007000E. I cannot tell whether the 4 placed windows played a part, since the shared segment was already over its budget.So on this game the memory under the windows is mapped page by page (64 KiB), scattered and with holes. A placed buffer over one run of a section cannot show it, and tile mappings into an opened heap remove the device (as
inplace.rssays). Reading the windows without a copy would need something other than one placed buffer per window. I have turned the change off on my side.Tested with an AI assistant (Claude Code); the runs were on my machine. No game files attached.