VRAM: compact the texture pools; aggressive compaction as the first VRAM-pressure step #614

Closed
opened 2026-10-10 01:15:50 +00:00 by sky_line · 1 comment
Owner

Texture pool blocks strand memory: on an RTX 3070 user's machine the pools held 1992 MB of blocks for 1647 MB of live images, 345 MB slack (257 MB stranded in the medium classes, 85% occupied). That's free VRAM before anything visible has to degrade.

Do

  • Background compaction: move live images out of sparsely used blocks into fuller ones and free the emptied blocks (copy + descriptor / bindless slot update, deferred frees through the existing retire path), bounded per frame.
  • First VRAM-pressure pre-step: when the budget manager sees pressure, before the ladder takes its first rung, run compaction much harder per frame until it is exhausted (near-zero slack). Free memory at the cost of some GPU copy / CPU work; often prevents the ladder from engaging at all.
  • Stats: slack before / after, MB moved per second, blocks freed, in the VKMem line.

Related: #411, #587.

Texture pool blocks strand memory: on an RTX 3070 user's machine the pools held 1992 MB of blocks for 1647 MB of live images, 345 MB slack (257 MB stranded in the medium classes, 85% occupied). That's free VRAM before anything visible has to degrade. ## Do - **Background compaction:** move live images out of sparsely used blocks into fuller ones and free the emptied blocks (copy + descriptor / bindless slot update, deferred frees through the existing retire path), bounded per frame. - **First VRAM-pressure pre-step:** when the budget manager sees pressure, before the ladder takes its first rung, run compaction much harder per frame until it is exhausted (near-zero slack). Free memory at the cost of some GPU copy / CPU work; often prevents the ladder from engaging at all. - Stats: slack before / after, MB moved per second, blocks freed, in the VKMem line. Related: #411, #587.
sky_line added this to the Slipstream project 2026-10-10 01:15:50 +00:00
Author
Owner

Done. Texture pool compaction + pressure pre-step before the VRAM ladder (da2c366314), per-pass move cap and cost ranking (c74bee530b), pinned textures never moved and background hysteresis (382ba5e8fe), no drain abort (6e87105999). Owner verified in-session that the churn is fixed (moves ~0 at steady state). Shipped in 1.2.0 (v1.2.0, 55f4242518).

Done. Texture pool compaction + pressure pre-step before the VRAM ladder (da2c366314), per-pass move cap and cost ranking (c74bee530b), pinned textures never moved and background hysteresis (382ba5e8fe), no drain abort (6e87105999). Owner verified in-session that the churn is fixed (moves ~0 at steady state). Shipped in 1.2.0 (v1.2.0, 55f4242518).
sky_line 2026-10-10 05:32:58 +00:00
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
sky_line/Slipstream#614
No description provided.