Skip to content

feat(k8s): gpu throttling, power limit, pcie and allocation panels over captured dcgm and kube-state-metrics series #821

Description

@dan-petty

Context & Rationale

The original GPU dashboard request asked for SM occupancy, thermal throttling, power against the TDP limit, PCIe throughput and GPU allocation.

None of these is charted today:

  • llm-stack.json's GPU row (lines 464-668) shows utilisation, memory used, power and temperature only.
  • The provisioned NVIDIA DCGM dashboard 12239 (k8s/monitoring/grafana-values.yaml:80-83) shows none of the requested fields either.

The data partly exists:

  • DCGM. The exporter runs with dcp-metrics-included.csv (k8s/monitoring/dcgm-exporter-values.yaml:35-37), whose profiling fields include SM occupancy and PCIe bytes. Which fields a card reports depends on the card; GeForce cards don't report profiling fields (values comment, lines 5-8).
  • Allocation. kube_node.* (for example kube_node_status_allocatable) and kube_pod_container_resource_requests are on k8s-monitoring 4.5.2's default kube-state-metrics allow list (feature-cluster-metrics/default-allow-lists/kube-state-metrics.yaml:19, 29), so GPU allocation can be charted.
  • GFD labels are not available. kube-state-metrics exports only the node labels on its metricLabelsAllowlist, which lists cloud and topology labels only (telemetry-services/values.yaml:82-83). GFD's nvidia.com/* node labels aren't on it.

Scope & Deliverables

  • Deliverable:
  • Acceptance criteria:
    • Each new panel returns a series on the homelab for at least one GPU.
    • The dashboard test covers the new names and labels.
    • The task file lists, per card model, which fields it doesn't report.
  • Key questions:
    • Should the GFD labels be added to metricLabelsAllowlist? No (proposed). Allocation from resources covers the need without extra label series.
    • Which field names? DCGM renamed throttle reasons to clock event reasons in newer releases. Use whichever name the capture shows (proposed).
  • Constraint: No panel over a field missing from every capture. Tests never touch the network.

Strategic Alignment

Update 2026-10-08: refinement

The DCGM dashboard is in the repo; the capture (tests/fixtures/metrics/dcgm-exporter.yaml) lacks clock-event, power-limit and SM-occupancy fields, and every node reads the image's counter file (k8s/monitoring/dcgm-exporter-values.yaml:35-37). (proposed) Keep a counters CSV in the repo and pass it with -f, then capture again.

Proposed design

Problem statement

The GPU row in llm-stack.json shows only utilisation, memory, power and temperature. It lacks clock-event (throttle) reasons, power against the enforced power limit, PCIe throughput, SM occupancy, and GPU allocation. The DCGM exporter CSV does not request these fields, so the capture fixture has no families for them. The kube-state-metrics allocation series is available but not charted.

Acceptance criteria

  • Criterion 1: The DCGM exporter CSV in the repo requests clock-event reasons, power limit, and SM occupancy fields.
    Verification: The CSV file passed with -f in k8s/monitoring/dcgm-exporter-values.yaml lists DCGM_FI_DEV_CLOCK_EVENTS (or its renamed equivalent), DCGM_FI_DEV_POWER_LIMIT, and DCGM_FI_PROF_SM_ACTIVE (or its renamed equivalent).
  • Criterion 2: The capture fixture lists every family a new panel reads.
    Verification: tests/fixtures/metrics/dcgm-exporter.yaml includes the clock-event, power-limit, and SM-occupancy families with their type and label names.
  • Criterion 3: llm-stack.json GPU row has panels for clock events, power vs limit, PCIe RX/TX, SM occupancy, and GPU allocation.
    Verification: k8s/monitoring/dashboards/llm-stack.json contains panels whose queries reference the new DCGM families and kube_node_status_allocatable{resource="nvidia_com_gpu"} against kube_pod_container_resource_requests{resource="nvidia_com_gpu"}.
  • Criterion 4: The dashboard test covers the new panel names and labels.
    Verification: tests/test_stack_dashboards.py references the new panel titles and metric names, and the test passes without network access.
  • Criterion 5: The task file lists, per card model, which fields it does not report.
    Verification: The change's tasks.md contains a per-model table naming the fields each card model omits.
  • Criterion 6: The kube-state-metrics fixture is mapped in the dashboard test for llm-stack.json.
    Verification: The test mapping for llm-stack.json includes tests/fixtures/metrics/kube-state-metrics.yaml.

Key questions

  • Should the GFD labels be added to metricLabelsAllowlist?: No. Allocation from kube_node_status_allocatable and kube_pod_container_resource_requests covers the need without extra label series. (proposed)
  • Which field names to use for throttle reasons?: Use whichever name the capture shows. DCGM renamed throttle reasons to clock event reasons in newer releases. (proposed)

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    type/feature
    scope/k8s
    priority/p3-low
    on Oct 1, 2026
  2. dan-petty commented on Oct 8, 2026

    @dan-petty
    OwnerAuthor

    Linked: #970. Both edit the GPU row of k8s/monitoring/dashboards/llm-stack.json (row 12, panels 13-17); whichever lands second rebases. Found by the 2026-10-08 backlog review.

  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Status set to Ready at bb46660 (see proposed design in issue body).

  4. added a commit that references this issue on Oct 28, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    priority/p3-lowscope/k8stype/feature

    Type

    No type

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions