TECHNOLOGY

Idle GPU, throttled CPU: diagnosing container CPU quota

In this article
THE QUICK TAKE

An idle GPU may be waiting for a feeder process that repeatedly exhausts its CPU quota. Inspect cpu.stat and the effective cpu.max value: average host utilization does not describe the time budget of one cgroup. CPU limits normally delay execution rather than terminate the container.

An idle GPU may be waiting for a feeder process that repeatedly exhausts its CPU quota. Inspect cpu.stat and the effective cpu.max value: average host utilization does not describe the time budget of one cgroup. CPU limits normally delay execution rather than terminate the container.

Separate quota from available processors

A CPU limit constrains execution time within a period. It is different from affinity and from the weight used during contention. A process can therefore see many logical processors while receiving a small time budget. Save the container settings, cpu.max, cpuset and the number of active preparation threads. Do not equate virtual CPUs with physical cores without information about the environment. Identify which process prepares input and which process submits work to the GPU.

Official reference 1.

Read changes in cpu.stat

For cgroup v2, inspect usage_usec, nr_periods, nr_throttled and throttled_usec, checking which fields the installed kernel provides. Compare deltas over equal windows. Accumulated throttling time does not automatically represent a service availability percentage. Inspect ancestor groups too: local accounting and the effects of ancestor limits can have different scopes. Quiet local counters do not eliminate the rest of the hierarchy as a potential source of execution delays.

Official reference 2.

Test a controlled scenario

Consider a preparation container with a quota of 100000 in a period of 100000 microseconds. That permits one CPU of execution time even if the program starts four threads. A short parallel burst can consume the allowance before the period ends. The GPU then waits for the next prepared chunk. This illustrates the scheduling mechanism rather than predicting a particular speedup from a configuration change.

Incident recordPurpose
cpu.max and periodReconstruct the permitted execution budget
Increase in nr_throttledLocate intervals affected by quota
Chunk preparation durationConnect CPU progress with GPU waiting

Exclude neighboring causes

Correlate throttling with storage queues, network waits and memory pressure. Two symptoms occurring together do not prove that one caused the other. During a controlled window, change only the CPU allowance or reduce competing preparation work. Preserve input size and thread count. If a larger allowance changes nothing, restore the original configuration and investigate the next stage. Changing engine parameters at the same time would make the result harder to interpret and repeat.

Confirm sustained recovery

Compare equal windows before and after the adjustment: preparation time, CPU usage, throttling deltas and GPU idle gaps. Then inspect neighboring containers, since the additional allowance consumes capacity from a shared node. Preserve a compact artifact containing the process, cgroup path, limits, input dataset and repeated result. During the next rollout, compare effective values with that record. A changed Pod template or resource request can bring the constraint back even when the application image remains identical.

State whether measurements cover the child group or its hierarchy. This makes the observation repeatable after relocation and prevents comparison of a local constraint with aggregate pressure at another resource-control level.

Related operational reading: cpu gpu hybrid architecture; compute optimized hosting.

← All articles