Main Content

Improve Performance Using GPU Monitor Metrics

R2026b

The GPU Monitor provides information that you can use to improve the efficiency of MATLAB® code that uses your GPU. This page explains what you might observe in the GPU Monitor and gives advice on how to use those observations to speed up your code.

GPU Activity

The Activity tab shows real-time plots of GPU utilization and memory usage.

This table gives tips for how to respond to observations made in the Activity tab.

ObservationExplanationPossible Actions
High utilizationThe GPU is consistently busy. High GPU utilization indicates that you are using all of your GPU's compute resources.
Low utilization

The GPU is frequently idle, so there is an opportunity to use it more effectively.

  • Move more of your compute to the GPU, for example by converting more of your data to gpuArray objects.

  • Increase the size of the data the GPU is operating on, for example by combining operations into batches or by vectorizing operations. For more information, see Vectorization.

High memory usage

Most of the GPU's memory is in use. Provided you do not run out of GPU memory, using most of the memory is not necessarily a bad thing.

On Windows® systems, the Windows Display Driver Model (WDDM) can reduce GPU performance when memory is scarce.

  • If you are running out of memory, reduce your problem size.

  • If your GPU is using WDDM and your GPU supports the Tesla Compute Cluster (TCC) driver model, change it to use the TCC driver model. For more information about switching driver models, consult the NVIDIA® documentation.

Low memory usageThe GPU has available memory
  • Move more of your data to the GPU.

  • Increase the size of the data the GPU is operating on, for example by combining operations into batches or by vectorizing operations. For more information, see Vectorization.

GPU Processes

The Processes tab shows tables of the processes running on the GPUs being monitored.

This table gives tips for how to respond to observations made in the Processes tab.

ObservationExplanationPossible Actions
Active graphics processesThe GPU is being used for graphics processing
  • If your GPU is using WDDM and your GPU supports the Tesla Compute Cluster (TCC) driver model, change it to use the TCC driver model. For more information about switching driver models, consult the NVIDIA documentation.

  • Close nonessential processes that are using the GPU.

Many active processesThe GPU is being used by other processes
  • Close nonessential processes that are using the GPU.

See Also

Topics