Skip to content

Idle GPU check: nvidia-smi failure reads as 0% (idle), and Neuron/Gaudi/AMD accelerators are never measured #954

Closed

Description

@scttfrdmn

Found while auditing idle signals for #937. Verified by reading the code only.

getGPUUtilization (pkg/agent/agent.go) returns 0 in three different cases, and the idle check takes 0 as a measured "GPU idle":

  1. nvidia-smi is not on PATH. This is correct for a host without an NVIDIA GPU.
  2. nvidia-smi is present but fails, for example when the driver and kernel modules do not match after a kernel update, the GPU has fallen off the bus, or it reports "No devices were found". The code reads this as idle, though it should be unknown, with the cpuUsage/networkBytes/diskIOBytes semantics: assume active, show "unknown" in status, warn once.
  3. Lines that do not parse ([N/A], [Not Supported]) are skipped silently. If every line is like that, the result is 0.

Separately, non-NVIDIA accelerators are never checked. Trainium/Inferentia (neuron-top/neuron-monitor, see #205), Gaudi (hl-smi, dl1/dl2q) and AMD (amd-smi/rocm-smi, g4ad) all read as GPU 0. A trn/inf job runs mostly on the device with little host CPU or network, so it could be idle-stopped mid-run. That would come from the CPU and network checks passing, not from this function returning a wrong number. Whether it actually happens depends on how much host CPU the Neuron runtime uses, which I have not measured.

The GPU signal is an instantaneous utilisation, not a counter, so it does not have #937's cumulative-vs-delta bug. A one-shot sample can miss a bursty kernel, but that errs towards idle only for very spiky loads.

Suggested fix: return (value, measured, why) like the other signals. Treat "tool present but failed" as unknown. Decide on, and document, what spored does on Neuron/Gaudi/AMD hosts: either measure them, or warn once that accelerator activity is not measured.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions