Skip to content

feat(k8s): Add SM activity and occupancy panel to LLM stack GPU row #2407

Closed

Description

@dan-petty

Problem or Motivation

The GPU row of k8s/monitoring/dashboards/llm-stack.json has no SM occupancy or SM activity panel. #821 asked for one "where the card reports it", but no capture can show the fields before the exporter collects them, and the exporter cannot be tested beside itself:

  • DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY are profiling (DCP) fields. The deployed counter list (customMetrics in k8s/monitoring/dcgm-exporter-values.yaml) does not ask for them.
  • The DCGM profiling module serves one client per GPU. The deployed dcgm-exporter pod is that client on each card that supports profiling. A temporary exporter pod of the same image (nvcr.io/nvidia/k8s/dcgm-exporter:4.6.1-4.8.4-distroless) on such a node got no profiling field. On the Tesla PG500-216 node, the whole GPU collector of the temporary pod failed: error watching fields: The third-party Profiling module returned an unrecoverable error (2026-10-28).
  • So the only way to capture the two fields is to let the deployed exporter ask for them. An untested profiling field in the deployed list can stop the GPU collector of a node: the temporary pod above lost every GPU metric of its node.

Only the Tesla PG500-216 and GeForce RTX 5070 Ti cards report profiling fields (capture of 2026-10-28). The Quadro P6000 and GeForce RTX 3090 report none.

Proposed Solution & Architectural Design

A person chooses how the deployed exporter is tested with the two fields, then the panel is built over the capture:

  1. Test window (proposed). A person allows a short window on the cluster: annotate the Argo CD Application dcgm-exporter with argocd.argoproj.io/skip-reconcile: "true", set the DaemonSet's counter list to the list plus DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY, capture /metrics of each pod through kubectl port-forward, then remove the annotation, so Argo CD's self-heal restores the DaemonSet. The GPU metrics of each node stop for the length of two pod restarts.
  2. Or merge first: add the two fields to customMetrics in a pull request, let Argo CD roll them out, and watch each pod's log for Failed to watch DCGM fields. A failure stops all GPU metrics of that node until a revert.

Then:

  • Add the two families to tests/fixtures/metrics/dcgm-exporter.yaml from the capture.
  • Add a panel "GPU SM Activity and Occupancy" to the GPU row of llm-stack.json over DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY (ratios from 0 to 1, unit percentunit), with a description that names the cards that do not report them.
  • tests/test_stack_dashboards.py checks the panel against the capture, and the test that the counter list asks for every captured family covers the new fields.

Acceptance criteria:

  • The deployed exporter on each card that supports profiling serves both fields, and its log has no Failed to watch DCGM fields.
  • The panel shows a series for at least one GPU.
  • uv run devops ci test tests/test_stack_dashboards.py passes.

Target Subsystem

Kubernetes / Homelab Manifests (scope/k8s)

Existing Tool Considered

The NVIDIA dcgm-exporter (Apache-2.0, maintained; 4.8.4 is deployed) already exports both fields: its own dcp-metrics-included.csv lists them, commented out. No code is built. The cost is the cluster test window and one dashboard panel.

Split off #821, which charts clock-event reasons, power against the enforced limit and PCIe throughput over fields that a capture shows.

Alternatives check of 2026-11-03: partly.
Tool: NVIDIA/dcgm-exporter (https://github.com/NVIDIA/dcgm-exporter), Apache-2.0, last activity 2026-11-02, maintained.

Proposed design

Problem statement

The GPU row of k8s/monitoring/dashboards/llm-stack.json has no SM activity or SM occupancy panel. The deployed counter list in k8s/monitoring/dcgm-exporter-values.yaml does not ask for DCGM_FI_PROF_SM_ACTIVE or DCGM_FI_PROF_SM_OCCUPANCY, although the dcgm-exporter image ships both as profiling gauges. A second exporter pod cannot capture them, because the DCGM profiling module serves one client per GPU and the deployed pod is that client. The change adds the two fields to the declared list, adds the panel over them, and confirms them with a live check after Argo CD rolls the DaemonSet.

Acceptance criteria

Requirement: Counter list includes both profiling fields

The customMetrics block in k8s/monitoring/dcgm-exporter-values.yaml SHALL include a gauge line for DCGM_FI_PROF_SM_ACTIVE and a gauge line for DCGM_FI_PROF_SM_OCCUPANCY.

Scenario: The Helm render holds both lines

  • WHEN helm template dcgm-exporter dcgm-exporter --repo https://nvidia.github.io/dcgm-exporter/helm-charts --version 4.8.4 -f k8s/monitoring/dcgm-exporter-values.yaml renders the chart.
  • THEN The rendered exporter-metrics-config-map holds a line that starts with DCGM_FI_PROF_SM_ACTIVE, gauge, and a line that starts with DCGM_FI_PROF_SM_OCCUPANCY, gauge,.

Requirement: Counter checksum matches the list

The podAnnotations.checksum/counters value SHALL equal the SHA-256 of the text of customMetrics.

Scenario: The render carries the checksum of the new list

  • WHEN The checksum/counters value of the rendered DaemonSet pod template is compared with sha256sum of the customMetrics text.
  • THEN The two values are equal, so the DaemonSet rolls onto the new list.

Requirement: GPU SM panel in the GPU row

The GPU row of k8s/monitoring/dashboards/llm-stack.json SHALL hold a timeseries panel titled GPU SM Activity and Occupancy with unit percentunit, one target for each field, and a position between the row GPUs and the next row.

Scenario: The dashboard lints and renders with the panel

  • WHEN uv run devops grafana dashboards lint k8s/monitoring/dashboards and uv run devops ci --check --only k8s run.
  • THEN The lint reports zero errors, and the rendered grafana-stack-dashboards ConfigMap holds the panel with gridPos.y greater than the GPU row's y and less than the y of the next row, unit percentunit, and two targets.

Requirement: Panel targets aggregate by the GPU label set

Each target of the GPU SM Activity and Occupancy panel MUST aggregate its family with avg by (hostname, gpu, modelName).

Scenario: Each target uses avg by

  • WHEN The rendered grafana-stack-dashboards ConfigMap is read for the two target expressions.
  • THEN The two expressions are avg by (hostname, gpu, modelName) (DCGM_FI_PROF_SM_ACTIVE) and avg by (hostname, gpu, modelName) (DCGM_FI_PROF_SM_OCCUPANCY).

Requirement: Panel description names the cards without the fields

The description of the GPU SM Activity and Occupancy panel SHALL name Quadro P6000 and GeForce RTX 3090 as the cards that report no profiling field.

Scenario: The rendered description names both cards

  • WHEN The grafana-stack-dashboards ConfigMap is rendered by uv run devops ci --check --only k8s.
  • THEN The description of the panel contains Quadro P6000 and GeForce RTX 3090.

Requirement: The deployed exporter serves both fields

The deployed exporter on each card with DCGM profiling support MUST serve DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY, and its log MUST hold no Failed to watch DCGM fields.

Scenario: The live check reads both fields and the pod log

  • WHEN After Argo CD rolls the DaemonSet, a person runs kubectl port-forward to the exporter pod and reads /metrics, and runs kubectl logs on the pod.
  • THEN The Tesla PG500-216 and GeForce RTX 5070 Ti series hold both families, and the log holds no Failed to watch DCGM fields.

Requirement: The panel shows a series for at least one GPU

The panel GPU SM Activity and Occupancy MUST show a series for at least one GPU.

Scenario: The live Grafana panel draws a line

  • WHEN A person opens the panel on the Grafana instance after the rollout.
  • THEN The panel draws at least one line, and a card without profiling support shows no line.

Existing Tool Considered

NVIDIA/dcgm-exporter (https://github.com/NVIDIA/dcgm-exporter), Apache-2.0, maintained, latest commit 2026-11-06 (fetched 2026-11-17), partly covers the need. It ships DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY in its default counter definitions, serves them as Prometheus gauges with 0..1 ratio semantics, and is the deployed DaemonSet whose customMetrics list this item extends. It lacks the panel in k8s/monitoring/dashboards/llm-stack.json, with its title, description, percentunit format and place in the GPU row; it does not enable the two fields in the deployed list by default; it cannot capture them from a second exporter pod, because the DCGM profiling module serves one client per GPU; and it gives no metrics fixture or stack-dashboard test, which the project no longer keeps (#6060). The change builds no code.

Key questions

  • Which path holds the stack-dashboard tests?: No stack-dashboard test module exists at this commit. The old tests/test_stack_dashboards.py and the planned tests/commands/k8s/test_stack_dashboards.py are gone; test(k8s): Drop the tests that repeat third-party version pins #6060 deleted the tests that read a committed manifest. Dashboard queries are checked by tests/prometheus/test_dashboard_queries.py with the case files in tests/fixtures/dashboard_queries/, and a dashboard manifest change is proven by uv run devops grafana dashboards lint k8s/monitoring/dashboards and uv run devops ci --check --only k8s, not by a pytest that reads the JSON. [sources: tests/prometheus/test_dashboard_queries.py:1, docs/TESTING.md:68, openspec/changes/archive/2026-11-16-6060-drop-config-value-tests/proposal.md:7]
  • Which labels do the two new fixture families carry?: No fixture is added. tests/fixtures/metrics/dcgm-exporter.yaml was deleted with the value tests (test(k8s): Drop the tests that repeat third-party version pins #6060), and a new test that reads a committed capture would fail the test-tree guard. The panel groups by hostname, gpu and modelName, the labels that the other GPU panels use; the exporter adds its own label set at scrape time, and the live check reads the real series. (best practice) [sources: docs/TESTING.md:61, openspec/changes/archive/2026-11-16-6060-drop-config-value-tests/proposal.md:7, k8s/monitoring/dashboards/llm-stack.json:968]
    • Chosen: No fixture; group by the labels of the other GPU panels. The fixture was deleted with the value tests, and the other GPU panels already group by hostname, gpu and modelName.
    • Rejected: Add a metrics fixture from a capture. A test that reads a committed capture is a value test that test(k8s): Drop the tests that repeat third-party version pins #6060 forbids, and no capture exists for the two fields.
    • Rejected: Invent a label set for the two families. The panel query and the live series would disagree.
  • Which fields does the dcgm-exporter image ship?: The 4.8.4 image's default counter definitions include DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY as profiling gauges. The deployed customMetrics list is that file plus DCGM_FI_DEV_ENFORCED_POWER_LIMIT and DCGM_EXP_CLOCK_EVENTS_COUNT, so the two lines are the only missing part. [sources: k8s/monitoring/dcgm-exporter-values.yaml:44]
  • Which unit does the panel use for the two fields?: Use percentunit. DCGM defines both fields as a ratio from 0 to 1, and percentunit draws that ratio as a percentage with no multiplication in the query. The nvidia-dcgm dashboard already draws the profiling ratio DCGM_FI_PROF_PIPE_TENSOR_ACTIVE in percentunit with min 0 and max 1. (best practice) [sources: k8s/monitoring/dashboards/nvidia-dcgm.json:756, k8s/monitoring/dashboards/llm-stack.json:1090]
    • Chosen: percentunit. The field value is a ratio from 0 to 1, so Grafana scales it with no change to the query.
    • Rejected: percent with a factor of 100 in the query. It adds a multiplication to each target and hides the ratio that DCGM reports.
    • Rejected: short. It draws a bare number and no percentage.
  • How does each panel target aggregate the two families?: Use avg by (hostname, gpu, modelName), as the GPU Utilisation panel does. The value is a utilization ratio, and the mean keeps the ratio of duplicate series. (best practice) [sources: k8s/monitoring/dashboards/llm-stack.json:968, k8s/monitoring/dashboards/llm-stack.json:1399]
    • Chosen: avg by (hostname, gpu, modelName). It matches the GPU Utilisation panel and keeps the mean of a ratio.
    • Rejected: max by (hostname, gpu, modelName). It can show the highest sample instead of the mean of a ratio.
    • Rejected: No aggregation. A second series for one GPU would draw a second line for the same card.
  • Must the checksum/counters annotation change with the counter list?: Yes. The chart mounts the list with subPath, so a running pod never reads a new list. The pod template carries the SHA-256 of customMetrics, and the dcgm-exporter spec requires the annotation to equal it; a changed list with an unchanged checksum does not roll the pods. [sources: k8s/monitoring/dcgm-exporter-values.yaml:36, openspec/specs/dcgm-exporter/spec.md:25]
  • Does the counter list change belong in the same pull request as the panel?: Yes. An item is delivered by exactly one pull request that delivers nothing else, and the list and the panel must change together so the panel queries a family the exporter collects. (best practice) [sources: CONTEXT.md:12, AGENTS.md:7]
    • Chosen: One pull request. The project delivers one item by one pull request, and the list and the panel test each other.
    • Rejected: Split the counter list from the panel. A split would leave the panel without the field that it charts and would add a second pull request for one item.
  • How are the two profiling fields verified on the cluster?: Add the two fields to the declared customMetrics list and let Argo CD roll the DaemonSet; then read /metrics through kubectl port-forward and the pod log on the Tesla PG500-216 and GeForce RTX 5070 Ti nodes. Do not pause Argo CD and edit the DaemonSet by hand: the declared list already asks for five profiling fields, and the cards without profiling support serve no line for them without losing their other GPU metrics. The failure in the issue came from a second exporter client on the Tesla PG500-216, not from an unsupported field. (best practice) [sources: k8s/monitoring/dcgm-exporter-values.yaml:101, k8s/monitoring/dashboards/llm-stack.json:1360]
    • Chosen: Declared change, then live check after rollout. Argo CD applies one declared list, and the live check confirms the fields on the profiling cards; the cards without profiling support already skip the five profiling fields that the list holds.
    • Rejected: Manual skip-reconcile window with a hand-edited DaemonSet. It is cluster drift that a person must restore, and the earlier failure came from a second profiling client, not from an unsupported field.
    • Rejected: Second exporter pod. The DCGM profiling module serves one client per GPU, and the deployed exporter is that client.
  • Which cards report the two profiling fields?: The Tesla PG500-216 and the GeForce RTX 5070 Ti report profiling fields. The Quadro P6000 and the GeForce RTX 3090 report none, so the panel has no line for them. [sources: k8s/monitoring/dashboards/llm-stack.json:1360, openspec/changes/archive/2026-10-28-821-gpu-dcgm-panels/proposal.md:50]

Fit

Fits in one pull request.

Suspected block

None.

Dependencies

None.

Activity

  1. added
    source/agent
    type/feature
    on Oct 28, 2026
  2. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Intake placed this item to the backlog: intake puts every new item in the backlog. A person plans the milestones on the board.

    • Type: type/feature. The candidate adds a new dashboard panel and new exporter metrics that do not exist today.
    • Priority: P2-Medium. It is a monitoring enhancement for 2 of 4 GPU types and does not block other work.
    • Value: Medium. SM activity and occupancy aid LLM inference tuning, but only 2 of 4 deployed card types report the fields.
    • Effort: Medium. It needs a risky cluster test window, a counter-list change, a panel, fixtures and a dashboard test.
    • Related: feat(k8s): gpu throttling, power limit, pcie and allocation panels over captured dcgm and kube-state-metrics series #821, which asks for a different change. Both add GPU panels to the same llm-stack.json row and use the same dcgm-exporter, but #821 covers throttling, power, PCIe and allocation while this covers SM activity and occupancy.
  3. dan-petty commented on Oct 28, 2026

    @dan-petty
    OwnerAuthor

    Refine cannot set this item to Ready at 73d1807 until a person answers the questions below. Reply in a comment or edit the body, and the next refine round looks at the item again.

    • A person must capture DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY from the deployed dcgm-exporter on profiling-capable nodes before the fixture and panel can be written.
  4. added
    priority/p2-medium
    status/new
    value/medium
    effort/medium
    scope/k8s
    on Oct 28, 2026
  5. devops-cli-service commented on Nov 3, 2026

    @devops-cli-service
    Contributor

    Alternatives check: partly

    Tool: NVIDIA/dcgm-exporter (https://github.com/NVIDIA/dcgm-exporter)

    • License: Apache-2.0
    • Last activity: 2026-11-02
    • Maintained: yes

    Covers:

    • NVIDIA dcgm-exporter is the component that serves the two profiling fields as Prometheus metrics: DCGM_FI_PROF_SM_ACTIVE and DCGM_FI_PROF_SM_OCCUPANCY appear in its shipped counter lists and are only skipped when the profiling (DCP) module is unavailable.
    • It is the deployed DaemonSet whose customMetrics counter list the issue proposes to extend, so the panel can query one exporter instead of new code.
    • The underlying DCGM profiling fields are documented (SM activity = field ID 1002, SM occupancy = field ID 1003), so the metric semantics the panel needs (ratios 0..1) are defined by the tool itself.

    Lacks:

    • No panel for the project's k8s/monitoring/dashboards/llm-stack.json GPU row: the dashboard JSON, panel title, description and percentunit formatting still have to be written in this repo.
    • Does not enable the two fields by default; they are commented out / skipped ("Skipping line ... metric not enabled") until they are added to the counter list and the profiling module is loaded.
    • Cannot be used to capture the fields beside the deployed exporter: the DCGM profiling module serves one client per GPU, so a second exporter pod on a profiling-capable card gets no profiling field (and on the Tesla PG500-216 the whole GPU collector failed with an unrecoverable profiling-module error).
    • Does not provide the metrics fixture (tests/fixtures/metrics/dcgm-exporter.yaml) or the stack-dashboard test that checks the panel against the capture.
    • Does not handle the cluster test window itself (Argo CD skip-reconcile annotation, port-forward capture, revert) and does not know which cards report the fields, so the person-side capture step remains.

    Searches run:

    • dcgm-exporter DCGM_FI_PROF_SM_ACTIVE DCGM_FI_PROF_SM_OCCUPANCY profiling metrics
    • grafana dashboard NVIDIA DCGM SM occupancy SM activity panel
    • grafana dashboard json DCGM_FI_PROF_SM_ACTIVE percentunit panel import

    Sources:

    Checked on 2026-11-03. A person decides what this means for the item. The check changes no label and closes no issue.

  6. changed the title [-]feat(k8s): sm activity and occupancy panel in the llm stack gpu row, after a tested capture of the dcgm profiling fields[/-] [+]feat(k8s): Add SM activity and occupancy panel to LLM stack GPU row[/+] on Nov 6, 2026
  7. dan-petty commented on Nov 6, 2026

    @dan-petty
    OwnerAuthor

    The job shortened the title of this item. The summary had 109 characters, and the limit is 60. The type and the scope stay.

    • Before: feat(k8s): sm activity and occupancy panel in the llm stack gpu row, after a tested capture of the dcgm profiling fields
    • After: feat(k8s): Add SM activity and occupancy panel to LLM stack GPU row
    • Source of the summary: the background model
  8. 36 remaining items

  9. added
    owner/service
    status/in-progress
    and removed
    status/planned
    on Nov 17, 2026
  10. added
    status/in-review
    and removed
    status/in-progress
    on Nov 17, 2026
  11. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Pull request #6143 is ready for review. The checks passed.

    Spend: 68 model requests, 4054745 input tokens, 20599 output tokens.

  12. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    The runner Job devops-cli-implement-devops-cli-2407-8aed41 ended: succeeded.
    Image digest: sha256:72980282a7992be6442688013dcca3927057a3178cba193981bcc5810703e19a

    The last lines of its log:

    # Implement plan for dan-petty/devops-cli
    
    ## To implement
    - #2407 feat(k8s): Add SM activity and occupancy panel to LLM stack GPU row: branch `feat/2407-add-sm-activity-and-occupancy-panel`, pull request #6143
    The checks of pull request #6143 still run after 39 s.
    The checks of pull request #6143 still run after 77 s.
    The checks of pull request #6143 still run after 115 s.
    The checks of pull request #6143 still run after 153 s.
    The checks of pull request #6143 still run after 192 s.
    The checks of pull request #6143 still run after 230 s.
    The checks of pull request #6143 still run after 268 s.
    The checks of pull request #6143 still run after 306 s.
    The checks of pull request #6143 still run after 344 s.
    ✓ Took 1 item(s) to a ready pull request, stopped 0.
    
  13. removed
    owner/service
    on Nov 17, 2026
  14. removed
    status/in-review
    on Nov 17, 2026
  15. devops-cli-service commented on Nov 17, 2026

    @devops-cli-service
    Contributor

    Live since 2026-11-17 14:05 UTC

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

    effort/mediumpriority/p2-mediumscope/k8ssource/agenttype/featurevalue/medium

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions