Skip to content

perf(gpu): give idle spare-list scratch back after a while - #474

Merged
pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
romainhedouin:perf/idle-list-scratch-trim
Nov 27, 2026
Merged

pragyaangaur merged 1 commit into
pragyaangaur:mainfrom
romainhedouin:perf/idle-list-scratch-trim

Conversation

@romainhedouin

Copy link
Copy Markdown
Contributor

A spare host list kept its last cycle's upload scratch for good (the count was capped at 64, the bytes were not), and the staging pools and the upload list aged only on submissions with textures. Now a spare list's scratch goes after recent::WINDOW (10 s) idle, the oldest goes past 256 MB in all (the most texture staging keeps), and every submission does the trimming; a list made again from a spare makes its scratch as a new one does.

before after
Most spare scratch that can sit idle (counted from the code: 64 lists that kept 11.9 MiB each) 764 MiB, no time limit 256 MiB, 10 s
Steady play 600 s, peak / mean spare scratch (model) 26.2 / 7.8 MiB 22.5 / 4.6 MiB, 31 MiB made again per run
21 held lists a minute, peak / mean (model) 50.1 / 23.0 MiB 47.9 / 7.7 MiB, 98 MiB made again per run
64 held lists, then 300 s quiet, mean (model) 92.0 MiB 3.1 MiB

Tested: native victory-gpu lib tests (107 pass), Windows clippy in both configurations; not run under CrossOver, the model's list sizes and trace are assumed, so the RAM held and the scratch made again in a real run are unmeasured (diagnostics now print the spare lists and their scratch). Small conflicts with #403, #404, #417 and #447.

🤖 Generated with Claude Code

Spare host lists kept their last cycle's upload scratch for good: up to 64
lists, each as large as its biggest cycle (64 lists keeping 12 MB held 764
MB), and the texture staging pools and the upload list only aged on
submissions with textures to bring up, so a texture-free stretch held the
last staged memory.

A spare list's scratch now goes once the list has been idle for
recent::WINDOW, and the oldest goes past 256 MB in all (the most texture
staging keeps); a list made again from a spare makes its scratch as a new
one does. Every submission trims the spare lists and ages the staging
pools, and the upload list lets go of what it staged as soon as the next
submission begins (not only when that one has textures). Diagnostics print
the spare lists and the scratch they keep.

Co-Authored-By: Claude Haiku 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@pragyaangaur
pragyaangaur merged commit a0b90ea into pragyaangaur:main Nov 27, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants