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!

Sunday, January 25, 2026

Working with GPUs - Part3 - Using dcgmi

The NVIDIA Data Center GPU Manager (DCGM) is a lightweight agent that performs several functions like GPU behavior monitoring, health and diagnostics, policy management, etc. DCGM is the underlying framework, and when you install it, it runs a service called the Host Engine, which collects data, monitors health, and manages GPUs. DCGMI is simply the CLI tool (the interface) used to talk to the engine. If you want to know what the engine is seeing or if you want to tell the engine to do something, you use dcgmi.

Install DCGM

  • In my case, I am installing it on Ubuntu 22.04.2 host. 
  • You can download the required binaries from this Nvidia repository.
  • If there are previous versions of the package installed, you can follow this documentation and remove them.
  • For example, I am installing version 4.5.2, which is compatible with cuda 13.0.
  • Download the following packages from the above mentioned repo:
    • datacenter-gpu-manager-4-core_4.5.2-1_amd64.deb
    • datacenter-gpu-manager-4-cuda13_4.5.2-1_amd64.deb
    • datacenter-gpu-manager-4-proprietary_4.5.2-1_amd64.deb
    • datacenter-gpu-manager-4-proprietary-cuda13_4.5.2-1_amd64.deb
  • Install them.
sudo DEBIAN_FRONTEND=noninteractive dpkg -i datacenter-gpu-manager-4-core_4.5.2-1_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive dpkg -i datacenter-gpu-manager-4-cuda13_4.5.2-1_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive dpkg -i datacenter-gpu-manager-4-proprietary_4.5.2-1_amd64.deb
sudo DEBIAN_FRONTEND=noninteractive dpkg -i datacenter-gpu-manager-4-proprietary-cuda13_4.5.2-1_amd64.deb

# Enable the dcgm service
systemctl --now enable nvidia-dcgm
systemctl start nvidia-dcgm

# Check if the service is active systemctl is-active --quiet nvidia-dcgm
  • Verify the installed version using: dcgmi --version
# dcgmi --version

dcgmi  version: 4.5.2

  • List all GPUs discovered by the host engine: dcgmi discovery -l


DCGM Diagnostics

Diagnostics is a subsystem within DCGM designed to stress-test and validate the physical and logical integrity of the GPU. It is a suite of automated tests that push the GPU beyond its normal idle state to uncover hidden hardware defects, driver instabilities, or environmental issues (like poor cooling or failing power supplies).  In production environments, this utility helps to assess cluster readiness levels before a workload is deployed on it. It supports multiple run levels as explained below.

  • Level 1: used for sanity Check which run before starting a container or job to ensure the GPU is "alive."
  • Level 2: used for analyzing/ examining failures and to get more context about it.
  • Level 3/4: for extensive hardware screening (e.g., checking for thermal throttling, bandwidth checks, etc.).

Here is how you can run a level 3 test: dcgmi diag -r 3
# dcgmi diag -r 3
Successfully ran diagnostic for group.
+---------------------------+------------------------------------------------+
| Diagnostic                | Result                                         |
+===========================+================================================+
|-----  Metadata  ----------+------------------------------------------------|
| DCGM Version              | 4.5.2                                          |
| Driver Version Detected   | 580.105.08                                     |
| GPU Device IDs Detected   | 2330, 2330, 2330, 2330, 2330, 2330, 2330, 2330 |
|-----  Deployment  --------+------------------------------------------------|
| software                  | Fail                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU3: Fail                                     |
| Warning: GPU3             | Page Retirement/Row Remap: GPU 3 had uncorrec  |
|                           | table memory errors and row remapping failed.  |
|                           |  Run a field diagnostic on the GPU.            |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
+-----  Hardware  ----------+------------------------------------------------+
| memory                    | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
| diagnostic                | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
| nvbandwidth               | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
+-----  Integration  -------+------------------------------------------------+
| pcie                      | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
+-----  Stress  ------------+------------------------------------------------+
| memory_bandwidth          | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
| targeted_stress           | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
| targeted_power            | Pass                                           |
|                           | GPU0: Pass                                     |
|                           | GPU1: Pass                                     |
|                           | GPU2: Pass                                     |
|                           | GPU4: Pass                                     |
|                           | GPU5: Pass                                     |
|                           | GPU6: Pass                                     |
|                           | GPU7: Pass                                     |
|                           | GPU3: Skip                                     |
+---------------------------+------------------------------------------------+

# dcgmi diag -r 4
Successfully ran diagnostic for group. +---------------------------+------------------------------------------------+ | Diagnostic | Result | +===========================+================================================+ |----- Metadata ----------+------------------------------------------------| | DCGM Version | 4.5.2 | | Driver Version Detected | 580.105.08 | | GPU Device IDs Detected | 2330, 2330, 2330, 2330, 2330, 2330, 2330, 2330 | |----- Deployment --------+------------------------------------------------| | software | Fail | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU3: Fail | | Warning: GPU3 | Page Retirement/Row Remap: GPU 3 had uncorrec | | | table memory errors and row remapping failed. | | | Run a field diagnostic on the GPU. | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | +----- Hardware ----------+------------------------------------------------+ | memory | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | diagnostic | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | nvbandwidth | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | pulse_test | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | +----- Integration -------+------------------------------------------------+ | pcie | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | +----- Stress ------------+------------------------------------------------+ | memtest | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | memory_bandwidth | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | targeted_stress | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | | targeted_power | Pass | | | GPU0: Pass | | | GPU1: Pass | | | GPU2: Pass | | | GPU4: Pass | | | GPU5: Pass | | | GPU6: Pass | | | GPU7: Pass | | | GPU3: Skip | +---------------------------+------------------------------------------------+

Here you can see GPU 3 had uncorrectable memory errors and row remap failed.

The dcgmi diag utility consists of multiple plugins as detailed below. Based on the selected run levels, respective plugins will be used to conduct the tests.

  • Deployment: verifies the compute environment is ready to run CUDA applications and is able to load the NVML library.
  • Diagnostic: performs large matrix multiplications. This will stress the GPU by having it draw a large amount of power and provide a high-level of throughput for five minutes (by default). During this process, the GPU will be monitored for all standard errors like XIDs, temperature violations, uncorrectable memory errors, etc. as well as the correctness of data being written and read.
  • PCIe - GPU bandwidth: purpose of this plugin is to stress the communication from the host to the GPUs as well as among the GPUs on the system. It will use NvLink to communicate between GPUs when possible. Otherwise, communication between GPUs will occur over PCIe.
  • GPU memory: It performs comprehensive memory testing to detect hardware faults, ECC errors, and memory corruption issues.
  • Targeted power: This test’s core purpose is to sustain a high level of power usage. It relies on CUDA and performs large matrix multiplications simultaneously on each GPU in order to keep the GPUs busy and drawing power. Each GPU has a large workload that is sustained throughout the test; the workload does not pulse.
  • Targeted stress: maintains a constant stress level on the GPU by continuously queuing matrix operations and adjusting the workload to achieve the target performance.
  • Memtest diagnostic: this is similar to memtest86, which will exercise GPU memory with various test patterns.
  • Pulse test: this is meant to fluctuate the power usage to create spikes in current flow on the board to ensure that the power supply is fully functional and can handle wide fluctuations in current.
  • NVbandwidth: performs bandwidth measurements on NVIDIA GPUs on a single host.
  • Memory bandwidth: It measures how fast each GPU can read from and write to its own memory, which is critical for applications that require high memory throughput. It allocates large memory arrays on each GPU and runs intensive memory operations to stress the memory subsystem. During this process, the GPU will be monitored for memory errors, CUDA errors, and performance thresholds.

Note: It is highly recommended to run these diagnostic tests while the node is in maintenance mode or when no active workloads (such as training jobs or inference services) are running on the GPU. Attempting to run higher-level diagnostics (especially levels 3 and 4) on an active node is a recipe for trouble: the diagnostic tests will likely fail to get the resources they need, and the contention for compute engines and VRAM may cause your production workloads to crash.

References


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!

Friday, August 15, 2025

Understanding NUMA: Its Impact on VM Performance in ESXi

VMware ESXi hosts use Non-Uniform Memory Access (NUMA) architecture to optimize CPU and memory locality. Each NUMA node consists of a subset of CPUs and memory. Accessing local memory within the same NUMA node is significantly faster than remote memory access. Misaligned NUMA configurations can lead to latency spikes, increased CPU Ready Time, and degraded VM performance.


Key symptoms

The common symptoms for Virtual Machines (VMs) on ESXi that have a misconfigured or misaligned Non-Uniform Memory Access (NUMA) configuration primarily manifest as performance degradation and latency. The main issue caused by NUMA misalignment is that the VM's vCPUs end up frequently having to access memory that belongs to a different physical NUMA node on the ESXi host (known as Remote Access), which is significantly slower than accessing local memory.

The resulting symptoms for the VM include:

  • Overall Slowness and Unresponsiveness: Services and applications running inside the guest OS may respond slowly or intermittently. The entire VM can feel sluggish.

  • High CPU Ready Time (%RDY): This is the most critical ESXi-level metric. CPU Ready Time represents the percentage of time a VM was ready to run but could not be scheduled on a physical CPU. High %RDY times (often above 5% or 10%) can indicate that the VM's vCPUs are struggling to get scheduled efficiently, which happens when they are spread across multiple NUMA nodes (NUMA spanning).

  • Excessive Remote Memory Access: When a VM consumes more vCPUs or memory than is available on a single physical NUMA node, a portion of its memory traffic becomes "remote." You can check this using the esxtop utility on the ESXi host.

Common misconfigurations


Misalignment often occurs when the VM's vCPU and memory settings exceed the resources of a single physical NUMA node on the host. Common causes include:

  • Over-Sized VM: Allocating more vCPUs than the physical cores available in a single physical NUMA node or allocating more memory than the physical memory on a single NUMA node.
  • Hot-Add Features: Enabling CPU Hot-Add or Memory Hot-Add can disable vNUMA (Virtual NUMA) for the VM, preventing the VMkernel from presenting an optimized NUMA topology to the guest OS.
  • Incorrect Cores per Socket Setting: While vSphere 6.5 and later are smarter about vNUMA, configuring the Cores per Socket value manually in a way that doesn't align with the host's physical NUMA topology can still lead to poor scheduling and memory placement, particularly when licensing dictates a low number of virtual sockets.
  • Setting VM Limits: Setting a memory limit on a VM that is lower than its configured memory can force the VMkernel to allocate the remaining memory from a remote NUMA node.

Check NUMA assignments in ESXi

  • SSH into the ESXi node.
  • Issue the esxtop command and press m for memory view, then press f to enable the fields, G to enable NUMA information.

  • You should be able to view the NUMA related information like NRMEM, NLMEM, and N%L.
    • NRMEM (MB): NUMA Remote MEMory
      • This is the current amount of a VM's memory (in MB) that is physically located on a remote NUMA node relative to where the VM's vCPUs are currently running.
      • High NRMEM indicates NUMA locality issues, meaning the vCPUs must cross the high-speed interconnect (like Intel's QPI/UPI or AMD's Infinity Fabric) to access some of their data, which results in slower performance.
    • NLMEM (MB): NUMA Local MEMory
      • This is the current amount of a VM's memory (in MB) that is physically located on the local NUMA node, meaning it's on the same physical node as the vCPUs accessing it.
      • The ESXi NUMA scheduler's goal is to maximize NLMEM to ensure fast memory access.
    • N%L: NUMA % Locality
      • This is the percentage of the VM's total memory that resides on the local NUMA node.
      • A value close to 100% is ideal, indicating excellent memory locality. If this value drops below 80%, the VM may experience poor NUMA locality and potential performance issues due to slower remote memory access.
  • Issue the esxtop command and press v to see the virtual machine screen.
  • From the virtual machine screen note down the GID of the VM under consideration, and press q to exit the screen.
  • Now issue the sched-stats -t numa-clients command. This will list down NUMA details of the VM. Check the groupID column to match the GID of the VM.
  • For example, the GID of the VM I am looking at is 7886858. This is a 112 CPU VM which is running on an 8-socket physical host.

  • You can see the VM is spread/ placed under NUMA nodes 0, 1, 2, and 3.
  • The remoteMem is 0, for each of these NUMA nodes, which means they are accessing all the local memory of the NUMA node.
  • To view physical NUMA details of the ESXI you can use sched-stats -t numa-pnode command. You can see this server has 8 NUMA nodes.
  • To view the NUMA latency, you can use the sched-stats -t numa-latency command.

Verify NUMA node details at guest OS


Windows
  • Easiest way is to go to Task Manager - Performance - CPU
    • Right click on the CPU utilization graph and select Change graph to - NUMA nodes
    • If there only one NUMA node, you may notice the option as greyed out.
  • To get detailed info you can consider using the sysinternals utility coreinfo64.

Linux
  • To view NUMA related details from the Linux guest OS layer, you can use the following commands:
lscpu | grep -i NUMA
dmesg | grep -i NUMA

Remediation


The most common remediation steps for fixing Non-Uniform Memory Access (NUMA) related performance issues in ESXi VMs revolve around right-sizing the VM to align its resources with the physical NUMA boundaries of the host.

The primary goal is to minimize Remote Memory Access (NRMEM) and maximize Local Memory Access (N%L). The vast majority of NUMA issues stem from a VM's resource allocation crossing a physical NUMA node boundary.

  • Right-Size VMs: Keep vCPU count within physical cores of a single NUMA node.
  • Evenly Divide Resources: For monster/ wide VMs, ensure the total vCPUs are configured such that they are evenly divisible by the number of physical NUMA nodes they span.
    • Example: If a VM needs 16 vCPUs on a host with 12-core NUMA nodes, configure the vCPUs to be a multiple of a NUMA node count (e.g., 2 sockets $\times$ 8 cores per socket to create 2 vNUMA nodes, aligning with 2 pNUMA nodes).
  • Cores per Socket Setting (Important for older vSphere/Licensing): While vSphere 6.5 and later automatically present an optimal vNUMA topology, you should still configure the Cores per Socket setting on the VM to create a vNUMA structure that aligns with the physical NUMA boundaries of the host. This helps the guest OS make better scheduling decisions.
  • Disable VM CPU/ Memory Hot-Add: Plan capacity upfront.

NUMA awareness is critical for troubleshooting and optimizing VM performance on ESXi. Misconfigured NUMA placements can severely impact latency-sensitive workloads like databases and analytics. Regular checks at both the hypervisor and guest OS layers ensure memory locality, reduce latency, and improve efficiency.

References


Hope it was useful. Cheers!