Curb host commit thrashing and widen ReBAR BAR headroom on <=16 GiB RAM systems #2671
No reviewers
Labels
No labels
AMD
audio
bug
confirmed
crash
cutscene
dlss
documentation
duplicate
enhancement
fixed-on-main
frame-generation
good first issue
help wanted
input
INTEL
invalid
lighting
linux-proton
memory
needs-info
needs-logs
needs-rebase
NVIDIA
performance
pr-diagnostics
pr-docs
pr-feature
pr-fix
pr-performance
pr-refactor
pr-tests
question
RAYTRACING
rendering
report
series-s
shaders
spam
startup
upstream
wontfix
No milestone
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set
Reference
github/trustno1-coder--VIctory-NVIDIA!2671
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-2671"
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?
@shrx404 on GitHub · 2026-11-29 15:49 UTC · original
shrx404:perf/low-ram-rebar-balance→main· +973 −180 · 17 files · 9 commits · openFixes #
What it changes
On systems with
<= 16 GiBof RAM paired with 6 GiB VRAM / smaller Windows shared-GPU budgets, running titles could push OS commit intopagefile.systhrashing, hitE_OUTOFMEMORYduring buffer/PSO creation, and spill BAR allocations into shared RAM while under-utilizing dedicated VRAM.At a Glance
<= 16 GiBRAM / Small Shared GPU)10s / 5s / 2s2.5s / 1.5s / 1.0shost.rs1 GiB/1.5 GiB1.5 GiBgrowth,2.5 GiBsoft warm trim (8lists/preludes),1.5 GiBhard drain (0)residency.rs,list.rs,host.rs512lists (256 MiB),256preludes,512batch spares,128 MiBUAV,32–64 MiBreadbacks64lists (32 MiB),32preludes,64batch spares,48 MiBUAV (8 MiBfloor),16 MiBreadbacks,1empty pool block (0when tight)pool.rs,list.rs,host.rs,host/uav_pool.rs,texback.rs512buffers ahead,256 MiBstaging floor0base lookahead,32 MiBstaging floor,<= 4default workersahead.rs,dstorage.rstry_lockleaf-poolfree_all_spares()on bothupload_buffer_ownandshared_buffer_ownhost.rs,pool.rs1gated compile at a time (low_host_ram());memguard::deferred()returnsNonefor clean retrycompilemem.rs,pipeline/host.rs80%BAR cap256 MiBinlet_go_idle/slot_evict; BAR cap92%(>= 4.5 GiB) /86%(< 4.5 GiB) on small shared GPUsresource.rs,shadow.rsDetailed breakdown by crate and file (13 files modified)
Commit pressure & pool shedding (
<= 16 GiBhost RAM)residency.rs/lib.rs: addslow_host_ram()(<= 16 GiB), exportsvictory_gpu::low_host_ram(), raiseshas_growth_reserve_for()(1.5 GiB) andcritical_commit_floor()(2.5 GiB), and addshard_critical_commit()(< 1.5 GiBor recent OOM).ahead.rs/dstorage.rs: sets defaultVICTORY_BUFFERS_AHEADbase to0, lowers defaultVICTORY_DSTORAGE_STAGING_MBfloor from256 MiBto32 MiB, and caps default DirectStorage workers at.min(4)whenlow_host_ram()is active.pool.rs/list.rs/host.rs/host/uav_pool.rs/texback.rs: tightens idle caps andram_idle_for_host(), addstrim_idle_blocks(),trim_idle_to(),trim_preludes_to(), andtrim_batch_spares()(keeping an8-entry list/prelude floor at1.5–2.5 GiBto avoid allocator churn), shares non-blockingtry_lockleaf-poolfree_all_spares()acrossupload_buffer_own()andshared_buffer_own(), and isolatespool::testsfrom global&SPARES.Shader compile serialization &
memguarddeferralscompilemem.rs: serializes gated compiles (State::try_start_for(..., low_ram)) to one concurrent compile on<= 16 GiBRAM hosts to prevent multi-GB overlapping driver commit spikes.pipeline/host.rs: addsrefusal_dxils()acrosscompute,mesh, andgraphicspaths somemguard::deferred()(E_OUTOFMEMORY) returnsNoneforPending::make_withretry instead of recording a permanent failure or callingrefused::retry.Sparse heap eviction & small-shared ReBAR headroom
resource.rs: addspool_hole_credit()(256 MiBcap on<= 16 GiBhosts) inlet_go_idle()andslot_evict()so fragmented64 MiBblocks still trigger eviction while keeping fulltexture_room()inroom()so hole reuse stays unblocked.shadow.rs: widensmapped_card_headroom_pct()onresidency::shared_is_small()GPUs (92%for>= 4.5 GiBbudgets,86%below4.5 GiB, vs80%elsewhere) and defaults low-RAM shadowVecpool retention to64 MiB.How it was tested
5,920 MBVRAM /5,152 MBDXGI local budget /~5,449 MBshared cap),12 GB(11.73 GiB) RAM, Series S profile (1280x720, DLSS off, Frame Gen off, Ray Tracing off).clean=False)22928: Crashed /4672: Cleantitle suspended; ending the title)1,612–1,637OOMs /638–6,820dev-removed42dev-removed →00OOMs,0dev-removed,0PSO failures>500 draws/frame)0.1–0.8 fpsmedian (2.7–3.9 fpsmax)2.5–3.8 fpsmedian (5.5–5.9 fpsmax)7.4 fpsmedian /14.8 fpsmax (8.0–8.4 fpsat end,n=94)victory-shadertranslation changes).cargo testpassed for the crates it touches: yes (follow-up audit refinements applied atop the validated profile; unit tests re-verified below)victory-hle:423 passed; 0 failed; 5 ignored(--lib) +2 passed; 0 failed(no_dll_planting)victory:78 + 1 + 2 passed; 0 failedvictory-gpu(pool::tests,shadow::window_tests, parallel):49 passed; 0 failed; 3 ignoredvictory-gpu(--lib,--test-threads=1):915 passed; 2 failed; 57 ignored(twotexbackpool tests tripped upstream stickyresidency::pressured()on this busy 12 GB machine late in the single-process run; both pass4 passed; 0 failedwhentexback::testsruns standalone)victory-formatshad 3 pre-existingbcpack::tests::oracle_parity_*failures locally.Checked for overlap
d1bdf0844fto81f02b01b1github-bot referenced this pull request2026-11-29 22:12:09 +00:00
81f02b01b1to0bab939fb7View command line instructions
Manual merge helper
Use this merge commit message when completing the merge manually.
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.