Showing posts with label nvidia-smi. Show all posts
Showing posts with label nvidia-smi. Show all posts

Friday, February 27, 2026

Working with GPUs - Part4 - Thermal issues

During routine diagnostics using dcgmi diag -r 3 test suite, several GPU nodes began failing due to thermal throttling issues. This blog post outlines how the issue was identified, investigated, and resolved. 

The problem

Multiple GPU servers began consistently failing level 3 dcgmi stress tests following a routine BMC (Baseboard Management Controller) firmware upgrade on the 8 GPU Supermicro servers. The diagnostic output flagged clocks_throttle_reason_sw_thermal_slowdown errors and indicated some GPUs exceeded the user-specified maximum allowed temperature of 87. Importantly, no underlying GPU hardware faults were identified. The environment was running DCGM version 3.1.8 with GPU driver version 550.90.x.

When the GPU temperature goes above 87, you will see the following thermal diagnostic warnings in the dcgmi r3 results:


Initial investigation

The initial investigation confirmed that no persistent hardware issues, sensor failures, or abnormal readings existed outside of the R3 test execution. The datacenter partner also confirmed no temperature events in the facility, and physical walkthroughs of affected nodes showed conditions normal.

This pointed towards a cooling configuration problem triggered only under the extreme thermal load of the R3 stress test. As a targeted experiment, the server fan mode was manually switched from the default "Optimal Speed" to "Full Speed", followed by a power cycle. The result was definitive: with fans forced to maximum, all GPUs stayed within safe temperature limits and all R3 tests passed. This was validated across multiple nodes and was giving consistent pass results. The datacenter partner's engineering team separately confirmed the recommendation to operate these H100 GPUs is in "Optimal Speed" fan mode, ruling out Full Speed as a viable permanent fix.

While the dcgmi R3 tests are running, we continuously gathered GPU metrics and sensor values using nvidia-smi and ipmitool for further review.

nvidia-smi --query-gpu=index,name,temperature.gpu,temperature.memory --format=csv -l 1 >> gpu_temp.log

# cat gpu_temp.log | grep "HBM3, 88" <<< you can see GPU temperature > 87 2, NVIDIA H100 80GB HBM3, 88, 90 1, NVIDIA H100 80GB HBM3, 88, 86 7, NVIDIA H100 80GB HBM3, 88, 80 6, NVIDIA H100 80GB HBM3, 88, 89 6, NVIDIA H100 80GB HBM3, 88, 91 0, NVIDIA H100 80GB HBM3, 88, 85 1, NVIDIA H100 80GB HBM3, 88, 89 5, NVIDIA H100 80GB HBM3, 88, 91 5, NVIDIA H100 80GB HBM3, 88, 92

# cat gpu_temp.log | grep "HBM3, 89" <<< you can see GPU temperature > 87 3, NVIDIA H100 80GB HBM3, 89, 85 3, NVIDIA H100 80GB HBM3, 89, 81 5, NVIDIA H100 80GB HBM3, 89, 93 5, NVIDIA H100 80GB HBM3, 89, 91
#!/usr/bin/env bash

while true; do
  sudo ipmitool sensor list >> sensor_data.log
done

# cat sensor_data.log | grep Fail | grep GPU Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< you can see GPU temperature > 87 Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 88C/190F | 5C/41F | 87C/189F | <<< Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F | Fail | (1210) GPU Temp | 87C/189F | 5C/41F | 87C/189F |
The above readings clearly indicate the GPUs are actually experiencing high temperature values above 87.

Root cause analysis

Working with the hardware vendor, the team uncovered the precise mechanism behind the cooling failure. The newer BMC firmware had introduced a fundamentally different fan control algorithm - a "T‑Limit"-based thermal management model - replacing the legacy temperature-threshold-based fan curve. However, the SDR (Sensor Data Record), which holds the fan curve data, is intentionally preserved (by default) across BMC firmware upgrades. As a result, after the firmware update the BMC continued operating with the outdated temperature-based fan curve parameters from the previous firmware version.

The change from temperature-based to T.Limit-based fan curve is a fundamental codebase change in the BMC thermal function. The SDR holds the fan curve data and must be cleared for the new curve to take effect. In practical terms, the stale fan curve meant that under the Optimal fan mode, fans did not ramp up aggressively enough to handle the rapid GPU thermal load generated during R3 tests, causing GPUs to exceed 87 °C.

Here is a brief explanation of the difference between temperature based and T.Limit based fan curve. In the temperature-based model, fan speeds are directly tied to specific temperature thresholds. As the temperature of a component (like a GPU) increases, the fan speed increases in predefined steps. 

  • The BMC monitors the GPU temperature. 
  • When the temperature crosses a threshold (e.g., 60°C, 70°C, 80°C), the fan speed increases accordingly. 
  • The fan response is reactive - it only ramps up after the temperature rises.
Example: 

GPU Temp (°C)Fan Speed (%)
< 6030%
60–7050%
70–8070%
> 80100%

Note: During high-load scenarios (like DCGM R3 stress tests), the temperature can spike rapidly. The fan response may lag, allowing the GPU to overheat before the fans catch up.

T.Limit-Based Fan Curve is a newer model and uses a proactive approach. Instead of waiting for the temperature to rise, it uses the GPU’s thermal limits (T.Limit) and workload predictions to adjust fan speeds preemptively. 

  • The BMC reads the GPU’s T.Limit (e.g., 87°C). 
  • It monitors power draw, workload intensity, and thermal headroom. 
  • Fan speed is adjusted dynamically to prevent the GPU from ever approaching the T.Limit.

Example:

GPU Temp (°C)Distance from T.Limit (87°C)Fan Speed (%)Behavior Description
4542°C below20%Idle state, minimal cooling needed
6027°C below50%Moderate load detected, fans ramping up
7017°C below70%High load, proactive cooling engaged
807°C below100%Nearing T.Limit, fans set to max speed
852°C below100%Critical threshold, full fan speed to prevent overheat
87At T.Limit100%Max cooling, risk of thermal throttling
>87Exceeded100% + ThrottleEmergency cooling + GPU throttling initiated

Note: The system anticipates thermal load and ramps up fans early, preventing overheating during sudden spikes in GPU usage.

Resolution

The SDR preservation behavior is by design. The --overwrite_sdr flag is the correct and intended mechanism for applying new thermal control parameters when the fan curve implementation changes between BMC firmware versions on Supermicro servers. If you do not want to reflash the BMC firmware with --overwrite_sdr flag, you can try clear the SDR using ipmitool. In my case, I've used the following command to clear the SDR.

ipmitool -I lanplus -H <BMC_IP> -U <USERNAME> -P '<PASSWORD>' raw 0x30 0x44

Note: In a production environment, you may first check with the server hardware vendor before executing these commands. It may also vary between different vendors.

After clearing the SDR and performing a server power cycle, the thermal diagnostic warnings were no longer observed, and all dcgmi diag -r 3 tests passed successfully with the fan mode set to Optimal.

# dcgmi diag -r 3
Successfully ran diagnostic for group.
+---------------------------+------------------------------------------------+
| Diagnostic                | Result                                         |
+===========================+================================================+
|-----  Metadata  ----------+------------------------------------------------|
| DCGM Version              | 3.1.8                                          |
| Driver Version Detected   | 550.90.07                                      |
| GPU Device IDs Detected   | 2330,2330,2330,2330,2330,2330,2330,2330        |
|-----  Deployment  --------+------------------------------------------------|
| Denylist                  | Pass                                           |
| NVML Library              | Pass                                           |
| CUDA Main Library         | Pass                                           |
| Permissions and OS Blocks | Pass                                           |
| Persistence Mode          | Pass                                           |
| Environment Variables     | Pass                                           |
| Page Retirement/Row Remap | Pass                                           |
| Graphics Processes        | Pass                                           |
| Inforom                   | Pass                                           |
+-----  Integration  -------+------------------------------------------------+
| PCIe                      | Pass - All                                     |
+-----  Hardware  ----------+------------------------------------------------+
| GPU Memory                | Pass - All                                     |
| Diagnostic                | Pass - All                                     |
+-----  Stress  ------------+------------------------------------------------+
| Targeted Stress           | Pass - All                                     |
| Targeted Power            | Pass - All                                     |
| Memory Bandwidth          | Pass - All                                     |
| EUD Test                  | Skip - All                                     |
+---------------------------+------------------------------------------------+

Identifying and resolving GPU thermal issues is critical to maintaining system stability and performance, especially under high-load scenarios like training jobs. Left unaddressed, thermal throttling can degrade performance, cause test failures, and even lead to hardware damage or job interruptions. Proactive thermal management ensures reliable operation and maximizes the efficiency of GPU-intensive workloads.

Hope it was useful. Cheers!

Friday, November 14, 2025

Working with GPUs - Part2 - Memory fault indicators

AI workloads rely heavily on GPU memory reliability and, memory faults can silently degrade performance long before a GPU outright fails. Understanding which signals truly indicate GPU memory issues, and how to act on them is essential for stable operations at scale. This post focuses on authoritative memory fault indicators on Nvidia H100 GPUs, how they differ, and how to use them together to make correct operational decisions.

HBM3 (High Bandwidth Memory 3) memory on H100 delivers massive bandwidth, but it operates under extreme thermal, electrical, and utilization stress. When memory reliability starts degrading:

  • Model training can fail intermittently
  • NCCL performance may collapse unexpectedly
  • Silent data corruption risks increase
  • Faulty GPUs can impact entire multi‑GPU jobs

Early detection lets you drain, reset, isolate, or RMA a GPU before a customer‑visible incident occurs.

Primary indicators

ECC errors

ECC (Error Correcting Code) detects and reports bit‑level memory errors in HBM3.

ECC error types:

  • Correctable Errors (CE)
    • Single‑bit errors fixed automatically
    • Indicate beginning of memory stress or aging
  • Uncorrectable Errors (UE)
    • Multi‑bit errors not recoverable
    • High risk of data corruption
    • Immediate GPU isolation required

nvidia-smi -q -d ECC


nvidia-smi --query-gpu=index,name,ecc.errors.corrected.volatile.device_memory,ecc.errors.corrected.volatile.dram,ecc.errors.corrected.volatile.sram,ecc.errors.corrected.volatile.total --format=csv


nvidia-smi --query-gpu=index,name,ecc.errors.uncorrected.volatile.device_memory,ecc.errors.uncorrected.volatile.dram,ecc.errors.uncorrected.volatile.sram,ecc.errors.uncorrected.volatile.total --format=csv


Notes

  • Rising CE counts is an early warning. Monitor closely.
  • Any UE count > 0, then drain workload, isolate GPU, and proceed to fix it.

Remapped Rows

Row Remapping is a hardware healing mechanism in H100 HBM3.

When the GPU identifies failing memory rows:

  • Faulty rows are permanently retired
  • Spare rows are mapped in their place

nvidia-smi -q -d ROW_REMAPPER


Notes
  • Remapped Rows Pending = Yes
    • GPU detected bad memory rows
    • Reset required to complete remap
  • Remapped Rows > 0
    • Hardware has already consumed spare memory
    • Strong early RMA signal

Row remapping is the earliest and strongest indicator of degrading HBM3 memory; often appearing before serious ECC failures.

Hope it was useful. Cheers!

Saturday, October 18, 2025

Working with GPUs - Part1 - Using nvidia-smi

GPUs are the backbone of modern AI and HPC clusters, and understanding their basic health and configuration is the first step toward reliable operations. In this first post of the series, we start with nvidia-smi - the primary tool for discovering Nvidia GPUs, validating drivers and CUDA versions, and performing essential health checks. These fundamentals form the baseline for monitoring, performance benchmarking, and troubleshooting GPU compute nodes at scale.

Verify version 

nvidia-smi --version


List all GPUs 

nvidia-smi -L


Current state of every GPU

nvidia-smi


Following are the key observations from the above output:

  • All 8 GPUs detected (NVIDIA H100 80GB HBM3). Confirms full hardware enumeration. 
  • HBM3 memory present (80GB per GPU). Validates expected SKU (H100 SXM vs PCIe). This is important because SXM GPUs behave differently in power, cooling, and NVLink bandwidth; troubleshooting playbooks differ by form factor.
  • Driver version 550.90.07 with CUDA compatibility 12.4. This confirms a Hopper‑supported, production‑ready driver stack. Many issues (NCCL failures, DCGM errors, framework crashes) trace back to unsupported driver–CUDA combinations.
  • Persistence Mode: On. This avoids GPU driver reinitialization delays and flaky behavior between jobs. Turning this off in clusters can cause intermittent job start failures or longer warm‑up times.
  • Temperatures in 34–41 °C range at idle. This indicates healthy cooling and airflow. High idle temperatures point to heatsink issues, airflow obstructions, fan/BMC problems, or thermal paste degradation.
  • Performance State: P0 (highest performance). This shows GPUs are not power or thermally‑throttled. If GPUs remain in lower P‑states under load, suspect thermal limits, power caps, or firmware misconfigurations.
  • Power usage ~70–76 W with cap at 700 W. This confirms ample power headroom and no throttling. GPUs hitting the power cap during load may show reduced performance even when utilization appears high.
  • GPU utilization at 0% and no running processes. This confirms the node is idle and clean. Useful to rule out “ghost” workloads, leaked CUDA contexts, or stuck processes when diagnosing performance drops.
  • Memory usage ~1 MiB per GPU. Only driver bookkeeping allocations present. Any significant memory use at idle suggests leftover processes or failed container teardown.
  • Volatile Uncorrected ECC errors: 0. Confirms memory integrity. Any non‑zero uncorrected ECC errors are serious and usually justify isolating the GPU and starting RMA/vendor diagnostics.
  • MIG mode: Disabled. Ensures full GPU and NVLink bandwidth availability. MIG partitions can severely impact NCCL and large‑model training if enabled unintentionally.
  • Compute mode: Default. Allows multiple processes (expected in shared clusters). Exclusive modes can cause unexpected job failures or scheduling issues.
  • Fan: N/A (SXM platform). Normal for chassis‑controlled cooling. Fan values appearing unexpectedly may indicate incorrect sensor readings or platform misidentification.


Health metrics of all GPUs


nvidia-smi -q

This shows details like:
  • Serial Number
  • VBIOS Version
  • GPU Part Number
  • Utilization
  • ECC Errors
  • Temperature, etc.

Query GPU health metrics


Help: nvidia-smi --help-query-gpu

GPU memory usage and utilization: nvidia-smi --query-gpu=index,name,uuid,driver_version,memory.total,memory.used,utilization.gpu --format=csv


GPU temperature status: nvidia-smi --query-gpu=index,name,uuid,temperature.gpu,temperature.gpu.tlimit,temperature.memory --format=csv


GPU reset state: nvidia-smi --query-gpu=index,name,uuid,reset_status.reset_required,reset_status.drain_and_reset_recommended --format=csv


  • reset_status.reset_required - indicates whether the GPU must be reset to return to a clean operational state.
  • reset_status.drain_and_reset_recommended - Yes, indicates GPU/ node should be drained first, then reset. No, indicates reset can be done immediately.
  • Note: In production GPU clusters based on Kubernetes, the safest and recommended practice is to always drain the node before attempting GPU recovery. For H100 SXM systems, recovery is performed via node reboot, not individual GPU resets.


NVLink topology

nvidia-smi topo -m


Note: Any non‑NVLink GPU‑to‑GPU path on H100 SXM immediately explains poor NCCL performance and requires hardware correction.

nvidia-smi nvlink -s         # shows per direction (Tx or Rx) bandwidth of all nvlinks of all GPUs

nvidia-smi nvlink -s -i 0 # shows per direction (Tx or Rx) bandwidth of all nvlinks of the GPU 0


Hope it was useful. Cheers!