question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Questions about gpustat display memory usage logic

See original GitHub issue

Hi, I was writing some GPU memory usage monitoring codes using nvmlDeviceGetComputeRunningProcesses. And I used gpustat for debugging. I found that gpustat reported about 5x memory usage than my program.

Did I use nvmlDeviceGetComputeRunningProcesses in the wrong way? How is the display logic of the yellow number below? (I tried to look at the source codes but did not find out the logic)

gpustat image

My codes image

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:7 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
wookayincommented, Jul 9, 2020

No worries. I think your program and gpustat are using the same API so you should be able to get the exactly same result. Please let us know if there’s anything we could help with.

0reactions
ganlercommented, Jul 9, 2020

FYI, we basically use the same API (nvmlDeviceGetComputeRunningProcesses and usedGpuMemory).

https://github.com/wookayin/gpustat/blob/v0.6.0/gpustat/core.py#L305 https://github.com/wookayin/gpustat/blob/v0.6.0/gpustat/core.py#L346

Hi @wookayin , I think this is my problem. I meant to monitor my C++ program’s GPU memory usage via nvmlDeviceGetComputeRunningProcesses but could not get the result as gpustat and nvidia-smi. It seems to be my problem and I should try to debug my program.

Thank you for your patience. Closed.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · wookayin/gpustat
A simple command-line utility for querying and monitoring GPU status ... Option to display a bar besides the number to indicate memory usage...
Read more >
Gpustat: A Command-line Utility for Querying and Monitoring ...
In this tutorial, we'll share Gpustat: A Command-line Utility for Querying and Monitoring GPU Status. Let's explore it with us now.
Read more >
gpustat
An utility to monitor NVIDIA GPU status and usage.
Read more >
Performance Tuning Dojo
Figure 4 shows the results with gpustat . Temperature is exceeding 55 degrees, and power consumption is approaching 230W; 2.5GB of memory is...
Read more >
Check GPU Memory Usage from Python - Abhay Shukla
You will need to install nvidia-ml-py3 library in python (pip install nvidia-ml-py3) which provides the bindings to NVIDIA Management library.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found