I think GR3D_FREQ 71%@1300 is the GPU utilization rate.
However real time utilization cannot reflect the overall utilization, it may fluctuate from 10% - 99 %, is there a way to get the average utilization or reasonable utilization rate of the GPU?
What I did is that collect the printed out utilization status for 2 minutes and then calculate the average of percentage(GR3D_FREQ ??%@1300), but this seems not a smart way, is there a better approach to get the average utilization rate of GPU?
Hi heyworld, if you desire to compute a different usage metric, you may be interested in reading the GPU load information directly from Linux.
See this post for more info:
I understand “sudo /home/ubuntu/tegrastats” could print out the GPU usage stats in some intervals set by user, but what I am interested in is that how I can get the average usage rate during, such as 5 minutes, is it doable with sudo ~/tegrastats with some arguments?
You could try the --interval argument to tegrastats, which accepts the number of milliseconds, like so:
$ sudo ~/tegrastats --interval 5000
This command probes every 5 seconds, for example. I’m not sure if/how it averages over the interval, if the behavior is not as you wish, you may be interested in this gtop tool developed from the community, which uses the raw file I/O method that I mentioned above:
I’m currently working with Jetson and I approached a similar problem.
The real problem with GPU measurement is that it works in a very high frequency, therefore, any measurements will be a rough approximation of the reality.
I checked @FindHao 's solution and it’s very good!
If I had to do a GPU approach, I would run tegrastat with inverval 5000-10000 and save the log in a .txt file. Then I would create a shell script to cut the GPU metrics. Finally, do a little math in order to find the mean GPU usage.