2

I am developing a monitoring agent for GPU cards that is capable of providing real-time telemetry using CUDA and NVML libraries.

I want to understand a little more about GPU core operation vs how Intel/AMD CPU cores work.

One formula that can be used for CPUs is (cpumhz or Workload average peak CPU utilization (MHz)) as follows:

((CPUSPEED * CORES) /100) * CPULOAD = Workload average peak CPU utilization

More details are here https://vikernel.wordpress.com/tag/vmware-formulas/

So would it be correct that the same formula can be applied to GPUs. The exception would be CUDA cores/shaders in place of "CORES" or could I just multiple the current clock speed by the actual gpu clock usage being that a GPU has a core clock for its 1000s of cores/shaders.

For example:

((GRAPHICS_MHZ * CUDA_CORES) /100) * GPU_LOAD = GPU MHZ utilization
Panos Kalatzantonakis
  • 12,525
  • 8
  • 64
  • 85
  • For GPU you would use SM utilization or SM scheduler (SMSP) as (sm[sp]__active_cycles / sm[sp]__elapsed_cycles * 100.) The elapsed_cycles divided by gpu__time_duration is the SM clock frequency. The metric names given are the PerfWorks metrics. Similar information can be collect through the CUPTI SDK but will be limited to a single CUDA context. I believe for all NVIDIA GPUs nvidia-smi will report 100% utilization for a 1 thread kernel launch. – Greg Smith Jul 20 '18 at 04:23

2 Answers2

2

Check out gpustat, it is a wrapper of nvidia-smi.


enter image description here

And GPUtil, it can fetch Maximum current relative load for a GPU

Panos Kalatzantonakis
  • 12,525
  • 8
  • 64
  • 85
  • Hello and thank you for your response. I know how to get the gpuload and memory load. I was trying to validate what I understand about how gpu cores work vs cpu cores when you want to see how much mhz utilization is being consumed based on the gpu load the the current graphics mhz. I can generate data like this: ` "gpu_graphics_clock_mhz": 139, "gpu_graphics_load": 76, "gpu_memory_bandwidth": 192.192, "gpu_memory_bandwidth_used": 19.44, "gpu_memory_bus": 192, "gpu_memory_clock_mhz": 405, "gpu_memory_load": 46, "gpu_memory_total": 3072, "gpu_memory_used": 262.49` – MyronStewart Jan 25 '18 at 16:09
  • I will check those tools out though ;-) – MyronStewart Jan 25 '18 at 16:12
0

I think I found my answer based on how a GPU card works. Being that each core runs in parallel they are working a lot more effectively than a CPU core from what I have read.

With a CPU core, you can use the above formula, but if you want to see the mhz used on a gpu card, you can simple just use:

(GRAPHICS_MHZ * /100) * GPU_LOAD = GPU MHZ utilization

The good thing is that the GPU_LOAD you get back is a different calculation provided from a GPU card than what you get from a CPU card. If anyone has a different opinion, I would love to hear it.