Monitoring GPU usage#
If you (like me) happen to be the performance freak, most likely you are well aware of process viewers like htop. Since I’ve started working with GPU-computing I missed htop-like tool tailored to monitor GPU usage. This is becoming more of an issue if you’re working in multi-GPU setups.
You can use nvidia-smi which is shipped with NVIDIA drivers, but it’s not very interactive.
gpustat provide nice and interactive view of the processes running and resources used across your GPUs, but you’ll need to switch between windows if you want to also monitor CPU usage.
pip install -U gpustat
gpustat -i
Some time ago I’ve discovered glances, a really powerful htop replacement. What’s best about glances (at least for me) is that beside I/O and information from sensors, you can see GPU usage. This is done thanks to py3nvml.
pip install -U glances py3nvml
glances -i
At first glances window may look a bit overwhelming, but after a few uses you’ll likely fell in love with it!
And what’s your favorite GPU process viewer?