Difference between revisions of "How to monitor the GCNANO GPU load"

[unchecked revision] [quality revision]
m
m (Undo revision 84965 by Nathalie Sangouard (talk))
(Tag: Undo)
 
Applicable for STM32MP15x lines
Deletion.png This page is a candidate for deletion.
The supplied reason is: Philippe has not the time to update and publish them. As the article has been created in 20189 and never published, we agreed with Philippe to delete them from public wikis and to save them in the wiki next.
-- NSA, PCO.
Wiki maintainers: remember to check if anything links this page before deleting it.

When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level, by using the following command:

 (while true; do 
gpu1=$(cat /sys/kernel/debug/gc/idle); \
sleep 4; \
gpu2=$(cat /sys/kernel/debug/gc/idle); \
echo $gpu1 $gpu2 | tr -d '\n' | tr -d ',' | tr -d 'ns' | awk -F" " '{printf("gpu load %.0f%%\n", ($10-$2)*100/($10+$12+$14+$16-$2-$4-$6-$8))}'; \
done) &

The GCNANO estimated GPU load is then periodically output in the user console as a percentage "%":

gpu load 75%
gpu load 75%
gpu load 75%

Notes:

  • Stop monitoring the GPU load with the command "kill -9 `ps -o ppid= -C sleep`".
  • Adjust the GPU load update period by modifying the "sleep" value (4 seconds in the example).
  • Use the command "dmesg -n8" to mix both user and kernel console outputs.
  • Debugfs configuration needs to be enabled.
  • The detailed calculation is: GPU load = (On-previous_On) / (Total-previous_Total) with Total=On+Off+Idle+Suspend, all variables coming from the command:
 cat /sys/kernel/debug/gc/idle
On:                2,071,009,284,477 ns
Off:              11,480,071,864,263 ns
Idle:                              0 ns
Suspend:           1,242,043,838,898 ns
...



{{ApplicableFor
|MPUs list=STM32MP15x
|MPUs checklist=STM32MP13x, STM32MP15x
}}{{ArticleToDelete|Philippe has not the time to update and publish them. As the article has been created in 20189 and never published, we agreed with Philippe to delete them from public wikis and to save them in the wiki next|NSA, PCO}}
When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level, by using the following command:
 {{Board$}} (while true; do 
 gpu1=$(cat /sys/kernel/debug/gc/idle); \
 sleep 4; \
 gpu2=$(cat /sys/kernel/debug/gc/idle); \
 echo $gpu1 $gpu2 | tr -d '\n' | tr -d ',' | tr -d 'ns' | awk -F" " '{printf("gpu load %.0f%%\n", ($10-$2)*100/($10+$12+$14+$16-$2-$4-$6-$8))}'; \
 done) &

The GCNANO estimated GPU load is then periodically output in the user console as a percentage "%":<pre>

gpu load 75%
gpu load 75%
gpu load 75%</pre>


Notes:
* Stop monitoring the GPU load with the command "'''kill -9 `ps -o ppid= -C sleep`'''".
* Adjust the GPU load update period by modifying the "sleep" value (4 seconds in the example).
* Use the command "dmesg -n8" to mix both user and kernel console outputs.
* [[Debugfs]] configuration needs to be enabled.
* The detailed calculation is: GPU load = (On-previous_On) / (Total-previous_Total) with Total=On+Off+Idle+Suspend, all variables coming from the command:
 {{Board$}} cat /sys/kernel/debug/gc/idle
 On:                2,071,009,284,477 ns
 Off:              11,480,071,864,263 ns
 Idle:                              0 ns
 Suspend:           1,242,043,838,898 ns
 ...
<noinclude>

{{PublicationRequestId | 10256 | 2019-01-15 | PhilipS}}

[[Category:GPU]]
[[Category:How to trace and debug]]</noinclude>
Line 3: Line 3:
 
|MPUs checklist=STM32MP13x, STM32MP15x
 
|MPUs checklist=STM32MP13x, STM32MP15x
 
}}
 
}}
{{ArticleToDelete|Philippe has not the time to update and publish them. As the article has been created in 20189 and never published, we agreed with Philippe to delete them from public wikis and to save them in the wiki next|NSA, PCO}}
 
 
 
When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level, by using the following command:
 
When a GPU animation is running on the display, the related GCNANO estimated GPU load can be monitored from the GCNANO driver level, by using the following command:
 
  {{Board$}} (while true; do  
 
  {{Board$}} (while true; do