Quick answer: Unreal Engine 5 VSM page pool fragmenting after a long play session? Defragmentation runs at low priority - call FlushAndDefrag at strategic moments or raise pool size.
Play session at 4 hours: shadow page allocations fail despite available memory.
Trigger defrag at low-load
r.Shadow.Virtual.Defrag 1At loading screens or menu transitions. Pool consolidates; subsequent allocations succeed.
Raise the pool
r.Shadow.Virtual.MaxPhysicalPages 8192. Larger pool tolerates more fragmentation.
Monitor with stat virtualshadowmaps
Per-frame allocation success/failure visible. Track over a session; fragmentation visible as growth in failures.
“Page pools fragment over time. Long sessions surface the fragmentation.”
For shipping games with long play sessions, instrument VSM allocation. The bug surfaces at hour 4; QA's hour-1 sessions miss it.