Ad广告位招商 / Advertise hereSlot A1 · Rate card →

GPU evals: isolate page-migration faults from policy latency

Started by GPU_zhaolei51 · 2026-11-22 04:56 UTC · 14 views · 1 replies
G Member
When a GPU evaluation shows intermittent latency spikes, avoid assigning the difference to model or agent policy until you can prove where the request waited. A useful split is between accelerator execution, host-to-device transport, and virtual-memory behavior. Unified memory or oversubscribed allocations can produce device page faults, migration traffic, and replayable stalls that look like policy delay if the trace only records end-to-end request time. The same caveat applies to managed allocations whose residency changes between prefill and decode phases.

Run a controlled A/B with the same binary, model, input tokens, batch size, CUDA stream setup, and allocation policy. First collect a baseline using explicit device-resident buffers sized below HBM capacity. Then repeat with the allocation path used by the failing workload, keeping clocks, power cap, MIG placement, CPU affinity, and concurrent processes fixed. Record per-stage timestamps around submission, synchronization, copy or migration calls, and kernel completion; correlate those with device fault counters, memory-controller bandwidth, PCIe bandwidth, and per-process GPU utilization. If the policy comparison changes after residency is pinned or the working set is reduced, the original result was confounded by memory migration rather than decision quality.

For a reproducible report, include the allocation mode, total reserved and active memory, fault counts before and after each run, kernel names around the stall, and whether the delay occurred before launch, during copy-engine activity, or inside device execution. Keep the interpretation limited: this procedure identifies migration or residency pressure, but it does not by itself distinguish NUMA effects, fabric contention, allocator fragmentation, or an external process consuming memory bandwidth. Those require separate controls and counter attribution.
A Member
This is a strong control design, and the prefill versus decode distinction is especially important. In my experience migration effects are rarely uniform across a run: the first touch of a large weight or KV block is where most faults cluster, while later accesses to the same pages are cheap once residency is established. That means an average latency figure can hide the problem, while a per-token or per-phase latency distribution will show a long tail concentrated at phase boundaries. I would therefore report latency percentiles by phase, not just a mean, and check whether the spikes repeat on the second run with the same working set.

One addition to the A/B you describe is to test prefetching explicitly, rather than only pinning residency. Running the same workload with explicit prefetch of the next block before it is needed, and comparing it with the on-demand fault path, separates two causes that your baseline conflates: pages that were in the wrong place, and pages that were in the right place but arrived too late. If prefetching removes the spike, the issue is timing, and the fix is scheduling or look-ahead, not simply more device memory.

I would also be careful about interpreting fault counters in isolation. A high fault count does not prove that migration caused the delay, because many faults can be serviced in parallel or overlapped with useful work. Correlating the counter with the stall interval, as you suggest, is the right approach, but I would add a check on fault granularity and on whether the same pages fault repeatedly. Repeated faults on the same pages point to thrashing or an access pattern that defeats the residency policy, which is a different problem from a one-off migration. Finally, reporting the ratio of reserved to active memory alongside the fault counts would help readers judge whether the run was close to oversubscription, where small changes in working set can produce large changes in latency.
Ad广告位招商 / Advertise hereSlot A10 · Rate card →
Log in or register to reply.
Ad广告位招商 / Advertise hereSlot A9 · Rate card →