[pr-fix][performance][memory] Lower the default DARNER_MEMORY_FLOOR_MB from 1024 to 512 #110
Loading…
Reference in a new issue
No description provided.
Delete branch "CRCODE22/Darner:fix/issue-70-memory-floor-512"
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?
Summary
The default soft floor of 1024 MB serialised first-seen pipelines into multi-second freezes on a 32 GB PC (the title commits ~17 GB; the driver's compiler takes several more; free RAM sits near 1 GB in a world load). 140 of 141 compilemem lines said pressured=true; the PC ended with 20 MB free; full-screen passes waited 1.4 to 7.2 s for their pipeline.
Lower the soft physical floor to 512 MB. Compiles still go one at a time under it, but the 4096 MB commit floor remains the hard limit that keeps the process from ending in ptxas fatal: Memory allocation failure.
Testing
Related
Fixes #70
Jesper-A referenced this pull request2026-12-03 23:02:56 +00:00
Startup A/B on RTX 4060
I ran four starts in ABBA order for #70 using the same Darner executable at
57dea7f236. For this change, explicitly setting the memory floor exercises the same production admission logic as the proposed default on54405dab32. The two admission source files are identical between the benchmarked revision and140980dd65.Windows 11 Pro 26300, Ryzen 7 5800X, 32 GiB RAM, RTX 4060 8 GiB, driver 621.40. Series X, 1440p preset, DLSS Quality, AUTO with active DLSS frame generation at 2×, and ray tracing off. Each run started from a clone of the same isolated profile and warm Darner cache, at the same point with no scripted movement. The driver cache was shared across runs. The effective settings differed only in
DARNER_MEMORY_FLOOR_MB. The commit floor was 4096 MiB throughout.The window ran from launch through 65 seconds after the first world marker. The largest gap is the maximum reported by the presentation smoothness log across that window. Available RAM is the sampled system value. Waited and deferred are cumulative compile counts from the last memory sample.
The 512 MiB runs both reached the world sooner than the first control and had smaller gaps. The final 1024 MiB control reached it in 51.21 s and had the shortest gap of all four runs. With two starts per value and that control spread, the effect on presentation stalls is inconclusive on this system. Available RAM reached 299 MiB at 512 MiB versus 453 MiB across the two 1024 MiB runs. All four runs reached the timed cutoff with active DLSS FG and zero logged crashes, device-loss or out-of-memory markers.
Admission replay
I separately replayed all seven compile-memory samples from an earlier 35.9 s gap on the same baseline. The checked-in admission code was compiled directly from
140980dd65and54405dab32in a dependency-free harness. With the sample figures held fixed and the recent-allocation-refusal input clear,140980dd65throttled all seven requests for another compile. The PR allowed one more in two samples and two more in the other five before throttling again. Both versions still throttled with a recent allocation refusal and returned the same verdict below the 4096 MiB adjusted commit floor. The sampled log'spressuredflag comes from the residency manager. The compile gate reads live figures at each attempt.cargo +1.98.1 test --locked --offline -j 1 -- --nocapturepassed 3 tests.cargo +1.98.1 test --locked --offline -j 1 --features pr110 -- --nocapturepassed the same 3 tests for the PR revision.Reading the ABBA: A1 (1,024 MiB) at 69.9 s with 105 deferred compiles looks like a cold first run. Without it, both floors land at about 50-51 s. 512 MiB does not start faster, and it takes the lowest available RAM down to 299-402 MiB against 453-636 MiB on a 32 GB PC. On this data the PR doesn't improve start time, and it leaves less RAM free. A second warm pair on a 16 GB PC would show whether it helps where #70 was reported.
View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.Merge
Merge the changes and update on Forgejo.Warning: The "Autodetect manual merge" setting is not enabled for this repository, you will have to mark this pull request as manually merged afterwards.