#1477: Snapshots are taken when free RAM is below the memory governor's reserve #1478
No reviewers
Labels
No labels
amd
avatars
bug
builder
cannot-reproduce
crash
epic
feature
from-viewer
gl-removal
known-limitation
monitoring
parity
perf
platform
priority
critical
priority
high
priority
low
priority
medium
provenance
rendering
rt
status
in-progress
status
testing
status
up-next
triage
ui
upstream
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
sky_line/Slipstream!1478
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "TheSlowly/Slipstream:snapshot-mem-reserve"
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?
Fixes #1477.
Both snapshot paths used free RAM minus the governor's reserve (3.8 GB on 32 GB), so any time free RAM dipped under the reserve every snapshot was refused, even a 41 MB live one. A shared helper (LLSnapshotBufferLimits::hostHeadroomBytes) keeps the old headroom above the reserve, allows half of what's free below it, and caps at half the remaining commit on Windows.
Tests:
snapshot_host_headroom_checks.cpp(standalone g++),snapshot_host_headroom_source_checks.pyin indra/newview/tests.Both snapshot paths sized their system memory as free RAM minus the memory governor's reserve (auto: 12% of RAM, 3.8 GB on a 32 GB machine). The reserve is the governor's steady-state cushion for other programs, so whenever free RAM dipped under it the headroom was zero and every snapshot was refused, even a 2560x1417 live one that needed 41 MB. LLSnapshotBufferLimits::hostHeadroomBytes now gives a snapshot everything above the reserve as before, or half of what is free when below it, and on Windows never more than half the commit still available. vk_live_snapshot and snapshotFit both use it. Test-Plan: g++ -std=c++17 -I../vkgfx snapshot_host_headroom_checks.cpp && ./a.out (in indra/newview/tests; fails to build before, ok after) python3 indra/newview/tests/snapshot_host_headroom_source_checks.py (fails before, ok after) In world, with other programs holding RAM so the memgov log line shows avail below reserve: a 2560x1417 snapshot is taken (live path), no "not enough free system memory". Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>View command line instructions
Checkout
From your project repository, check out a new branch and test the changes.