Bind merge cuts sparse-submit work and remap waits, but not mean fps in a 4K walk #205

Closed
opened 2026-12-02 11:10:24 +00:00 by github-bot · 2 comments
Owner

@⁠TheRifai on GitHub · 2026-12-02 11:08 UTC · original

Evidence for the "Remaps during streaming: GPU binds" task (docs/TASKS.md): merging adjacent sparse binds removes ~2/3 of vkQueueBindSparse work and lowers the renderer's per-present remap wait, but did not change mean fps in this 4K camera walk.

Seen on: main d59b4f8, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save rt3, warm shader store, 110 s per run, A/B/B/A with UMEM_BIND_MERGE=1 (default) vs =0 (one VkSparseMemoryBind per queued piece). Keys W/I/K/J at 20/45/70/95 s to keep streaming active. VKB_LAT=1 for per-frame labels; validation not used for timing.

Run Merge Mean fps (last 40 host windows) Binds queued / sent (final) vkQueueBindSparse total Remap wait per slow frame
A1 on 27.86 543,312 / 179,810 5,600 ms 3.65 ms
B1 off 27.88 540,833 / 540,833 7,954 ms 10.18 ms
B2 off 28.11 543,566 / 543,566 8,220 ms 9.82 ms
A2 on 27.91 553,602 / 184,307 5,521 ms 5.98 ms

So the existing merge step cuts sent binds by ~3x and vkQueueBindSparse time by ~2.4 s over 110 s, and the remap-wait label is roughly halved (3.7–6.0 vs 9.8–10.2 ms per slow frame). Mean fps is unchanged in this scene, and the number of >=50 ms frames does not show a clear pair difference (145/186 on, 154/165 off). That suggests the merge lever affects submission overhead and tail latency more than steady fps here; a scene with heavier remap churn or a smaller queue budget may show the frame-time benefit.

No code change from me; this is a measurement of an existing switch. Evidence: /home/shlong/Documents/VKtory-capture/bindmerge-ab-{A1,B1,B2,A2}/.

**@⁠TheRifai** on GitHub · 2026-12-02 11:08 UTC · [original](https://github.com/vktory6/VKtory/issues/205) Evidence for the "Remaps during streaming: GPU binds" task (docs/TASKS.md): merging adjacent sparse binds removes ~2/3 of `vkQueueBindSparse` work and lowers the renderer's per-present remap wait, but did not change mean fps in this 4K camera walk. **Seen on:** main `d59b4f8`, RX 9070 XT / RADV 26.3.1, GE-Proton11-16, Series X, 3840x2160, house save `rt3`, warm shader store, 110 s per run, A/B/B/A with `UMEM_BIND_MERGE=1` (default) vs `=0` (one `VkSparseMemoryBind` per queued piece). Keys W/I/K/J at 20/45/70/95 s to keep streaming active. `VKB_LAT=1` for per-frame labels; validation not used for timing. | Run | Merge | Mean fps (last 40 host windows) | Binds queued / sent (final) | `vkQueueBindSparse` total | Remap wait per slow frame | |---|---|---:|---:|---:|---:| | A1 | on | 27.86 | 543,312 / 179,810 | 5,600 ms | 3.65 ms | | B1 | off | 27.88 | 540,833 / 540,833 | 7,954 ms | 10.18 ms | | B2 | off | 28.11 | 543,566 / 543,566 | 8,220 ms | 9.82 ms | | A2 | on | 27.91 | 553,602 / 184,307 | 5,521 ms | 5.98 ms | So the existing merge step cuts sent binds by ~3x and `vkQueueBindSparse` time by ~2.4 s over 110 s, and the remap-wait label is roughly halved (3.7–6.0 vs 9.8–10.2 ms per slow frame). Mean fps is unchanged in this scene, and the number of >=50 ms frames does not show a clear pair difference (145/186 on, 154/165 off). That suggests the merge lever affects submission overhead and tail latency more than steady fps here; a scene with heavier remap churn or a smaller queue budget may show the frame-time benefit. No code change from me; this is a measurement of an existing switch. Evidence: `/home/shlong/Documents/VKtory-capture/bindmerge-ab-{A1,B1,B2,A2}/`.
github-bot locked as GitHub sync and limited conversation to collaborators 2026-12-02 11:10:25 +00:00
Author
Owner

@⁠TheRifai on GitHub · 2026-12-02 11:26 UTC · original

Related bind-side measurement for this task: UMEM_LAZY_UNBIND=1 reduces queued binds another ~18% in the same 4K camera walk, but costs about 0.4–0.5 fps here and is an accepted deviation (it hides GPU faults), so it is not a free win.

A/B/B/A on main d59b4f8, RX 9070 XT / GE-Proton11-16, Series X 3840x2160, house save rt3, 105 s runs, W/I/K/J at 20/45/70/95 s, VKB_LAT=1:

Run Lazy unbind Mean fps Binds queued/sent (final) Unviews left / replaced by bind / unbound later Remap wait per slow frame
A1 off 28.43 539,519 / 180,817 0 / 0 / 0 4.96 ms
B1 on 27.69 444,573 / 163,989 138,306 / 92,413 / 45,526 5.98 ms
B2 on 27.93 443,304 / 159,358 137,606 / 89,528 / 47,907 4.95 ms
A2 off 28.24 534,631 / 179,529 0 / 0 / 0 5.59 ms

So the extra bind reduction is real (≈95k fewer queued binds per ~105 s) but the fps direction is slightly negative and the remap-wait label does not improve consistently. Combined with the merge result in this issue, the cheap bind-side levers do not turn into a frame-time win in this scene; heavier remap churn may be needed to see it. Evidence: /home/shlong/Documents/VKtory-capture/lazyunbind-ab-{A1,B1,B2,A2}/.

**@⁠TheRifai** on GitHub · 2026-12-02 11:26 UTC · [original](https://github.com/vktory6/VKtory/issues/205#issuecomment-7343914558) Related bind-side measurement for this task: `UMEM_LAZY_UNBIND=1` reduces queued binds another ~18% in the same 4K camera walk, but costs about 0.4–0.5 fps here and is an accepted deviation (it hides GPU faults), so it is not a free win. A/B/B/A on main `d59b4f8`, RX 9070 XT / GE-Proton11-16, Series X 3840x2160, house save `rt3`, 105 s runs, W/I/K/J at 20/45/70/95 s, `VKB_LAT=1`: | Run | Lazy unbind | Mean fps | Binds queued/sent (final) | Unviews left / replaced by bind / unbound later | Remap wait per slow frame | |---|---|---:|---:|---:|---:| | A1 | off | 28.43 | 539,519 / 180,817 | 0 / 0 / 0 | 4.96 ms | | B1 | on | 27.69 | 444,573 / 163,989 | 138,306 / 92,413 / 45,526 | 5.98 ms | | B2 | on | 27.93 | 443,304 / 159,358 | 137,606 / 89,528 / 47,907 | 4.95 ms | | A2 | off | 28.24 | 534,631 / 179,529 | 0 / 0 / 0 | 5.59 ms | So the extra bind reduction is real (≈95k fewer queued binds per ~105 s) but the fps direction is slightly negative and the remap-wait label does not improve consistently. Combined with the merge result in this issue, the cheap bind-side levers do not turn into a frame-time win in this scene; heavier remap churn may be needed to see it. Evidence: `/home/shlong/Documents/VKtory-capture/lazyunbind-ab-{A1,B1,B2,A2}/`.
Author
Owner

@⁠vktory6 on GitHub · 2026-12-02 16:01 UTC · original

Thanks, these numbers are now in the matching TASKS item(s), so the next person starts from them: github.com/vktory6/VKtory@dcb33f3. Closing here, the tasks track the work.

**@⁠vktory6** on GitHub · 2026-12-02 16:01 UTC · [original](https://github.com/vktory6/VKtory/issues/205#issuecomment-7351331244) Thanks, these numbers are now in the matching TASKS item(s), so the next person starts from them: https://github.com/vktory6/VKtory/commit/dcb33f3. Closing here, the tasks track the work.
This discussion has been locked. Commenting is limited to contributors.
No milestone
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
github/vktory6--VKtory#205
No description provided.