TECHNOLOGY

How can CUDA scheduler overhead slow multi-GPU decoding?

In this article
THE QUICK TAKE

Profile the host scheduler with your tensor overrides in place. Compare one GPU and the target split so that host-side calls do not get mistaken for slow kernels.

A slow token step can leave GPUs underused when time is spent preparing work on the CPU. The llama.cpp b12819 snapshot, published at 00:21 UTC on 28 November, changed when CUDA device type is looked up. The author reported that cudaGetDeviceProperties took about 700 μs to 1 ms with CUDA 12 and that tensor overrides across several devices triggered repeated queries as the scheduler visited split inputs. The code now derives the type from device properties at initialization and retains it. The quoted timing is the maintainer’s observation, not a throughput measurement for every workload.

Match the split that causes repeated work

Hold model, weights, context, runtime and driver fixed. Start with one device, then use the overrides and layer placement from the multi-device job you intend to run. Record CPU time in scheduler work, counts of device-property calls, and GPU kernel duration. A trace with idle accelerator gaps and little change to kernel time identifies a different bottleneck from accelerator memory bandwidth or interconnect saturation.

Keep first-token and steady-state measurements separate

Caching moves the lookup to initialization, so a cold start and a warm generation loop answer different questions. Measure startup, prefill and steady decode separately. Include the distribution of token gaps and record any CPU affinity or topology settings that affect the comparison. The issue can matter for tail latency even if a bulk average changes little.

Use the result to make a placement decision

If host wait time falls while kernel time is steady, retest your split before buying faster hardware. If results do not move, investigate transfers or device work on the same trace. Save the runtime and placement configuration alongside the timing so the improvement can be checked again after driver and model updates.

Repeat with the expected request mix

A synthetic stream of one request isolates the scheduler. A steady service might instead queue several requests and use a different split policy for batches. Add an interactive traffic mix with the same prompt distribution, streaming mode and batch limits before drawing a capacity conclusion. Track latency per request alongside overall decode throughput, since a scheduling change can reduce gaps for one client without increasing the number of requests the node can serve.

Sources

Earn rental income from GPUs

Have idle GPUs or looking to fund AI infrastructure? Retrivium finds a rental platform, sets up the server and helps you assess income and costs with a pilot.

Explore GPU hosting
← All articles