DirectStorage: fewer read workers at the start, the rest later (start-up int3 on a 16-thread Ryzen) #368
No reviewers
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!368
Loading…
Reference in a new issue
No description provided.
Delete branch "github-bot/gh-368"
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?
@afutuga on GitHub · 2026-11-27 21:31 UTC · original
afutuga:dstorage-workers→main· +38 −9 · 1 files · 2 commits · openPC: Windows 10 22H2 (19045), RTX 4060 Ti 16 GB, Ryzen 7 5700X (8 cores, 16 threads), 32 GB.
Built from source, release profile.
The problem
After a few good sessions, every start began to end about 2 seconds in, during "Game Init", with
the title's own breakpoint:
followed by the title's crash report. It was the same in every run: Series X and S, with and
without DLSS / frame generation, GPU scheduling on and off, a clean NVIDIA driver, fresh game
files, an empty data folder, empty shader / pipeline / image caches, and a freshly built
victory.exe.What changes it
VICTORY_LOG=info,victory_hle::modules::dstorage=tracestarts and runsnormally (about 100,000 "request done" lines; the workers queue on the log writer).
With
victory_hle=debugonly, it still stops.dstorage: submitbatches, right after
InitializeApiImplEx2.VICTORY_DSTORAGE_IO=onedoes not help.VICTORY_DSTORAGE_WORKERS=1the releasebuild starts and plays. But with one worker for the whole session things show late in play.
So it looks like a timing race between the workers' completions and the title that shows up only
when all sixteen workers run freely.
This change
VICTORY_DSTORAGE_WORKERS=<n>caps the DirectStorage pool at n workers at the start (at mostone a CPU thread; the file handles stay as they are).
VICTORY_DSTORAGE_WORKERS_AFTER=<seconds>starts the rest of the pool that long after the firstread, so streaming in play gets all of them back.
With
VICTORY_DSTORAGE_WORKERS=1andVICTORY_DSTORAGE_WORKERS_AFTER=60the title starts, thelog shows the pool going to 16 at 60 s, and it plays on without stopping.
Without the switches nothing changes. It is a workaround for players who hit this; the real fix is
probably in how a request's completion is published to the title.
DirectStorage: VICTORY_DSTORAGE_WORKERS caps the read workers (start-up int3 on a 16-thread Ryzen)to DirectStorage: fewer read workers at the start, the rest later (start-up int3 on a 16-thread Ryzen)View 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.