You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
perf(renderer): avoid repeated direct image-heap work after slot exhaustion #362
area: gpu-memoryMemory tracking, write faults, buffer and texture caches, write-backshelp wantedExtra attention is neededperfSpeed: frames per second, CPU or GPU time, stutters
Measure how often the renderer retries direct image-heap binding after slot exhaustion and how often the same tables fall back to another binding path. This is related to the persistent descriptor-pool pressure in #340 and concerns the separate direct image-heap allocation path.
One Linux/NVIDIA capture recorded seven first overflows and 41,753 subsequent requests for already-overflowed views across 23 garbage-collection windows. Request counts alone do not establish the cost of a retry or the cause of omitted draws.
Acceptance
Measure direct-heap occupancy, unique slots needed, first and repeated failures, and the CPU time and allocation cost of the fallback path.
Reduce repeated work after exhaustion, while allowing a later retry when enough slots become available.
Verify that the fallback binds equivalent resources and respects descriptor lifetimes. Check that peak memory stays within the same budget on the comparison workload.
For the baseline, can you measure CPU time spent on repeated direct-heap failures separately from time spent building and binding the fallback descriptors in the same capture? That will show how much work skipping the retry can actually save.
For the optimization, use the number of additional unique slots the table needs, not its total size, to decide when to retry. Include a test where reclamation first frees too few slots and then frees enough, with the fallback descriptors still in flight when the direct path becomes available again.
I'll take this one. I'll investigate the repeated direct image-heap failures, measure their overhead, and work on avoiding unnecessary retries while preserving fallback descriptor lifetimes and allowing recovery after reclamation.
A trace from the Linux VRAM investigation in #363 may help verify the table fallback. While a diagnostic limited image creation through the direct heap, the later loading spike included 5,515 MiB of live device-local image allocations and 1,031 MiB on the host heap from RenderExecutor::ResolveTableTexture. Only 947 MiB of device-local image allocations were attributed to ImageHeap::Rebind at that point. The VMA local heap reached its 9,216 MiB cap. This identifies where the images were allocated. The trace did not record the admission decision, so it cannot yet distinguish heap capacity from another reason the renderer selected ordinary texture tables.
Thanks, the #363 trace helps attribute the memory spike, but it doesn’t show why the renderer chose the fallback. Can the next capture record the admission outcome at the table binding decision and distinguish insufficient direct-heap slots from other reasons for using the ordinary table path?
area: gpu-memoryMemory tracking, write faults, buffer and texture caches, write-backshelp wantedExtra attention is neededperfSpeed: frames per second, CPU or GPU time, stutters
Activity
github-actions commentedon Nov 27, 2026
For the baseline, can you measure CPU time spent on repeated direct-heap failures separately from time spent building and binding the fallback descriptors in the same capture? That will show how much work skipping the retry can actually save.
For the optimization, use the number of additional unique slots the table needs, not its total size, to decide when to retry. Include a test where reclamation first frees too few slots and then frees enough, with the fallback descriptors still in flight when the direct path becomes available again.
smecherucarbarou commentedon Nov 27, 2026
I'll take this one. I'll investigate the repeated direct image-heap failures, measure their overhead, and work on avoiding unnecessary retries while preserving fallback descriptor lifetimes and allowing recovery after reclamation.
simnJS commentedon Nov 27, 2026
A trace from the Linux VRAM investigation in #363 may help verify the table fallback. While a diagnostic limited image creation through the direct heap, the later loading spike included 5,515 MiB of live device-local image allocations and 1,031 MiB on the host heap from
RenderExecutor::ResolveTableTexture. Only 947 MiB of device-local image allocations were attributed toImageHeap::Rebindat that point. The VMA local heap reached its 9,216 MiB cap. This identifies where the images were allocated. The trace did not record the admission decision, so it cannot yet distinguish heap capacity from another reason the renderer selected ordinary texture tables.github-actions commentedon Nov 27, 2026
Thanks, the #363 trace helps attribute the memory spike, but it doesn’t show why the renderer chose the fallback. Can the next capture record the admission outcome at the table binding decision and distinguish insufficient direct-heap slots from other reasons for using the ordinary table path?