Reduce write tracking and parallel refresh overhead #3694
Loading…
Reference in a new issue
No description provided.
Delete branch "upstream-pr/3694"
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?
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by edge2labs on 2026-11-30T04:12:29Z.
Following your feedback, Phase 2 focuses on the submitting thread's write tracking bottleneck.
Two opt-in optimizations:
Synthetic benchmark results on i9-14900K:
Validation: 340 correctness test executions passed, 24 benchmarks passed, and Release and Diagnostics builds succeeded.
Default behavior remains unchanged. The previously acknowledged asset-policy issue remains unrelated to this PR.
These are synthetic results, not measured FPS gains. Please test both flags enabled in-game without frame generation and report FPS and write tracking costs.
Thank you for your feedback.
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by davemathews12 on 2026-11-30T05:26:55Z.
I read through it and the changes look correct:
VICTORY_ASK_ONCE_GAP_MIBuses the same units asAHEAD_GAP:(mib << 20) / PAGE, wherePAGEis 64 KiB here. Unset or out-of-range values keep the 8 MiB default, and 0 merges only touching ranges, as the doc says.VICTORY_REFRESH_GRAINis bounded to 1..=256, and when it is unset the old 8/1 grains are kept.cfg(test)/cfg(all(test, feature = "diagnostics"))).One thing worth adding: with both knobs unset, the runtime behaves exactly as on
main, so the PR doesn't reduce overhead for anyone yet. If you have numbers from the new harness showing which gap and grain values help (and on which CPU), posting them here would let a better default ship.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by edge2labs on 2026-11-30T06:24:07Z.
Thanks for reviewing the changes!
You’re absolutely right. I intentionally preserved the existing defaults until we had enough evidence to justify changing them.
I tested both parameters extensively on the following system:
41adb551)Refresh grain sweep — median refresh time:
Grain Time
Original 16.87 ms
1 16.91 ms
4 15.98 ms
8 12.79 ms
16 12.45 ms
32 12.55 ms
Ask-once gap sweep — median refresh time:
Gap Time
0 MiB 10.11 ms
4 MiB 11.13 ms
8 MiB 12.38 ms
16 MiB 15.32 ms
32 MiB 19.29 ms
64 MiB 22.47 ms
The initial gap sweep improved refresh time but did not consistently improve total wall time because of the landing workload.
After refining the harness to use the existing persistent landing worker and pool, I validated the combined configuration:
VICTORY_REFRESH_GRAIN=16
VICTORY_ASK_ONCE_GAP_MIB=0
Final synthetic wall-time results:
CPU load threads Holes Baseline Optimized Reduction
0 No 20.0678 ms 16.4844 ms 17.86%
0 Yes 19.6773 ms 16.2449 ms 17.44%
12 No 23.1163 ms 18.6761 ms 19.21%
12 Yes 22.5487 ms 17.9678 ms 20.32%
Validation:
These are synthetic measurements, not in-game FPS results.
Based on this evidence, grain 16 and gap 0 are my preferred candidates for new defaults. However, I would like to confirm their behavior on other CPU architectures and in actual gameplay before making them universal.
Would you recommend an in-game A/B validation first, or would you prefer that I update the PR with these defaults?
I can also provide the detailed benchmark logs.
Thanks again for the technical review!
— Edge2Labs
Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by davemathews12 on 2026-11-30T15:45:23Z.
Thanks for the numbers. Grain 16 taking the refresh from 16.87 to 12.45 ms is a clear signal. I'd do the in-game A/B first, before changing the defaults: the defaults apply to everyone, and the numbers so far are synthetic. DoubleD17's method on #3524 is a good template. Several 150 s runs of the PR and
mainin ABBA order on a fixed CPU-bound view, comparing CPU preparation time, fps, and a quick look for visual glitches. WithVICTORY_REFRESH_GRAIN=16 VICTORY_ASK_ONCE_GAP_MIB=0against unset, on your 14900K plus one other CPU (ideally one with 6–8 cores), that would make the case for new defaults hard to argue with.Imported from trustno1-coder/VIctory-NVIDIA. Originally posted by trustno1-coder on 2026-12-01T18:49:50Z.
Closing this as part of moving main to the texture and video-memory rework (v2026.12.01.01-test). A lot of the code changed, and this pull request no longer applies cleanly to it; it would need to be rewritten against the new main rather than rebased. Thank you for the work. If the change is still needed, please open a new pull request based on the current main.
Pull request closed