Skip to content

fix(dashboard): read GPU memory from per-card series, not per-container - #615

Merged
KUASWoodyLIN merged 2 commits into
mainfrom
614-cluster-gpu-memory-card-and-node-table-gpu-columns-show-no-data-while-gpus-are-allocated
Aug 6, 2026
Merged

fix(dashboard): read GPU memory from per-card series, not per-container#615
KUASWoodyLIN merged 2 commits into
mainfrom
614-cluster-gpu-memory-card-and-node-table-gpu-columns-show-no-data-while-gpus-are-allocated

Conversation

@KUASWoodyLIN

Copy link
Copy Markdown
Collaborator

The cluster GPU Memory card and the node table's GPU columns were built on HAMi's per-container series (hami_container_device_memory_bytes, hami_vgpu_memory_used_bytes, hami_vgpu_memory_limit_bytes). HAMi-core only emits those from inside an actively running vGPU container, so they vanish on an idle cluster — even while the scheduler holds an allocation for a pod. In PromQL sum(<empty>) / sum(x) is an empty vector, so both panels rendered "no data" while Prometheus reported success.

Point every GPU memory reading at per-card series instead: hami_gpu_memory_limit_bytes for capacity, hami_gpu_memory_allocated_bytes for request, and the device plugin's hami_host_gpu_memory_used_bytes for usage. Pod attribution in the node table moves to hami_vgpu_memory_allocated_bytes, which is scheduler-side and still carries exported_namespace/exported_pod, so the per-card consumer breakdown survives.

Also harden the card: gate "no data" on capacity rather than usage, and wrap each numerator in or vector(0) so an absent series reads 0% instead of collapsing the panel.

The cluster GPU Memory card and the node table's GPU columns were built on
HAMi's per-container series (hami_container_device_memory_bytes,
hami_vgpu_memory_used_bytes, hami_vgpu_memory_limit_bytes). HAMi-core only
emits those from inside an actively running vGPU container, so they vanish on
an idle cluster — even while the scheduler holds an allocation for a pod. In
PromQL `sum(<empty>) / sum(x)` is an empty vector, so both panels rendered
"no data" while Prometheus reported success.

Point every GPU memory reading at per-card series instead:
hami_gpu_memory_limit_bytes for capacity, hami_gpu_memory_allocated_bytes for
request, and the device plugin's hami_host_gpu_memory_used_bytes for usage.
Pod attribution in the node table moves to hami_vgpu_memory_allocated_bytes,
which is scheduler-side and still carries exported_namespace/exported_pod, so
the per-card consumer breakdown survives.

Also harden the card: gate "no data" on capacity rather than usage, and wrap
each numerator in `or vector(0)` so an absent series reads 0% instead of
collapsing the panel.
@KUASWoodyLIN
KUASWoodyLIN merged commit b97c4ab into main Aug 6, 2026
8 of 11 checks passed
@KUASWoodyLIN
KUASWoodyLIN deleted the 614-cluster-gpu-memory-card-and-node-table-gpu-columns-show-no-data-while-gpus-are-allocated branch August 6, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Cluster GPU Memory card and node table GPU columns show "no data" while GPUs are allocated

2 participants