Difference between revisions of "NVIDIA Jetson Orin/JetPack 5.0.2/Performance Tuning/Evaluating Performance"

From RidgeRun Developer Connection
Jump to: navigation, search
(Created page with "<noinclude> {{NVIDIA Jetson Orin/Head|previous=JetPack 4.1/Performance Tuning|next=JetPack 4.1‎/Performance Tuning/Set Values Manually|keywords=jetpack,perfomance,tuning,teg...")
 
m
 
(22 intermediate revisions by 5 users not shown)
Line 1: Line 1:
 
<noinclude>
 
<noinclude>
{{NVIDIA Jetson Orin/Head|previous=JetPack 4.1/Performance Tuning|next=JetPack 4.1‎/Performance Tuning/Set Values Manually|keywords=jetpack,perfomance,tuning,tegrastats}}
+
{{NVIDIA Jetson Orin/Head|previous=JetPack 5.0.2/Performance Tuning|next=JetPack 5.0.2‎/Performance Tuning/Set Values Manually|metakeywords=jetpack,performance,tuning,tegrastats}}
 
</noinclude>
 
</noinclude>
<!-- If you want a custom title for the page, un-comment and edit this line:
 
{{DISPLAYTITLE:NVIDIA Jetson Orin - <descriptive page name>|noerror}}
 
-->
 
  
__toc__
+
{{DISPLAYTITLE:NVIDIA Jetson Orin - Evaluating Performance|noerror}}
 +
 
 +
__notoc__
 +
As developers, we often need to measure CPU, GPU, and memory usage to budget the applications that need to run in our projects. NVIDIA provides the tegrastats tool to extract these and other important metrics in Jetson platforms. This section provides an overview of the usage of tegrastats.
  
 
==tegrastats==
 
==tegrastats==
The Jetpack provides the tegrastats utility, which reports memory usage and processor usage for Tegra-based devices.
 
  
This utility in the nvidia user home directory and can be run using the command:
+
tegrastats is a tool that reports memory usage, GPU usage, CPU usage, and SOC temperature for Tegra-based devices. Tegrastats comes installed in the sample root filesystem provided in Jetpack, and it's located in the Orin AGX system path /usr/bin, so it can be launched from any location in the filesystem. To launch tegrastats, simply run the binary with privileges:
 +
 
 
<syntaxhighlight lang=bash>
 
<syntaxhighlight lang=bash>
sudo ./tegrastats
+
sudo tegrastats
 
</syntaxhighlight>
 
</syntaxhighlight>
  
tegrastats supports the following command-line options.
+
This command will start printing the system stats each second, an example of the expected output can be found in the next subsection. If you need to customize the tegrastats behavior, the binary provides the following command-line options:
 +
 
 
<pre>
 
<pre>
--interval <int>    The interval at which tegrastats is to write output to the log, in milliseconds. The default interval is 1000 msec.
+
Usage: tegrastats [-option]
--verbose            Print verbose messages.
+
Options:
--stop               Stop any running instances of tegrastats.
+
    --help                  : print this help screen
--logfile <out_file> Dump the output of tegrastats to <out_file>.
+
    --interval <millisec>  : sample the information in <milliseconds>
 +
     --logfile  <filename>  : dump the output of tegrastats to <filename>
 +
    --load_cfg <filename>  : load the information from <filename>
 +
    --readall              : collect all stats including performance intensive stats
 +
    --save_cfg <filename>  : save the information to <filename>
 +
    --start                : run tegrastats as a daemon process in the background
 +
    --stop                 : stop any running instances of tegrastats
 +
    --verbose              : print verbose message
 
</pre>
 
</pre>
  
===Sample Output===
+
===tegrastats Output===
 +
 
 +
You can find below an example of the output printed by tegrastats in the Orin AGX and Table 1 providing a description to help interpret some of the metrics provided by tegrastats.
 +
 
 
<pre>
 
<pre>
RAM 1903/15692MB (lfb 3251x4MB) CPU [1%@1190,1%@1190,2%@1190,0%@1190,0%@1190,0%@1190,0%@1190,0%@1190] EMC_FREQ 0% GR3D_FREQ 0% AO@32.5C GPU@32C Tboard@32C Tdiode@34.75C AUX@31.5C CPU@33.5C thermal@32.9C PMIC@100C GPU 0/10 CPU 210/216 SOC 860/864 CV 0/0 VDDRQ 140/144 SYS5V 1880/1889
+
07-21-2022 20:40:24 RAM 5059/30623MB (lfb 5843x4MB) SWAP 0/15311MB (cached 0MB) CPU [15%@735,12%@729,5%@729,10%@729,10%@710,6%@726,6%@729,6%@725,6%@2189,11%@726,5%@1932,8%@853] EMC_FREQ 5%@3199 GR3D_FREQ 0%@114 GR3D2_FREQ 0%@114 NVENC 115 NVDEC 998 NVJPG 729 NVJPG1 729 VIC_FREQ 0%@729 APE 233 CV0@-256C CPU@53.562C Tdiode@43.25C SOC2@49.218C SOC0@50.437C CV1@-256C GPU@48.468C SOC1@49.156C CV2@-256C VDD_GPU_SOC 7968mW/7969mW VDD_CPU_CV 2391mW/2391mW VIN_SYS_5V0 5266mW/5266mW NC 0mW/0mW VDDQ_VDD2_1V8AO 1415mW/1415mW NC 0mW/0mW
 
</pre>
 
</pre>
 +
 +
 
<br>
 
<br>
{| class="wikitable"
+
{| class="wikitable" style="margin:auto"
 +
|+ Table 1: tegrastats interpretation
 
|-
 
|-
 
! Statistic !! Description
 
! Statistic !! Description
 
|-
 
|-
| RAM 1903/15692MB (lfb 3251x4MB) || 1903=Use of Ram, 15692=Total amount of RAM available, 4MB=Largest size of free block, 3251=Amount of free blocks of largest size
+
| RAM 5059/30623MB (lfb 5843x4MB) (lfb 5844x4MB) || 5059 MB of RAM are in use, 30623 MB of RAM is available for applications and there are 5843 blocks of size 4 MB (the largest free block size or lfb) that can be allocated.
|-
 
| CPU [1%@1190,...,1%@1190] || 1=Load statistics for each core, 1190=CPU frequency in MHz
 
 
|-
 
|-
| EMC_FREQ 17% || 17=Percentage of bandwidth used relative to running frequency
+
| SWAP 0/15311MB (cached 0MB) || 0 MB of SWAP used, 15311 MB of SWAP available for applications, and 0 MB of SWAP cached.
 
|-
 
|-
| GR3D_FREQ 0% || 0=DGPU utilization
+
| CPU [15%@735,...,8%@853] || Each A@B value is a statistic for one of the CPUs. The first CPU in the example has a load of 15% and is running at 735 MHz. The CPU load can also show as ''off'' if it's powered down.
 
|-
 
|-
| AO@32.5C || Always on thermal zone temperature
+
| EMC_FREQ 5%@3199 || 5% of the External Memory Controller bandwidth is used, and it's running at 3199 MHz.
 
|-
 
|-
| GPU@32C || GPU temperature
+
| GR3D_FREQ 0%@114 || The first GPU engine has 0% of usage and is running at 114 MHz.
 
|-
 
|-
| Tboard@32C || Temperature inside the external temperature sensor
+
| GR3D2_FREQ 0%@114 || The second GPU engine has 0% of usage and is running at 114 MHz.
 
|-
 
|-
| Tdiode@34.75C || External temperature sensor read the temperature through Tdoide inside TK1
+
| NVENC 115 || The NVIDIA Video Encoder Engine is running at 115 MHz.
 
|-
 
|-
| AUX@31.5C || Temperature of the auxiliary sensor, located near CV cluster, SOC cluster
+
| NVDEC 998 || The NVIDIA Video Decoder Engine is running at 998 MHz.
 
|-
 
|-
| CPU@33.5C || CPU Temperature
+
| NVJPG 729 || The first NVIDIA JPEG Engine is running at 729 MHz.
 
|-
 
|-
| thermal@32.9C || -
+
| NVJPG1 729 || The second NVIDIA JPEG Engine is running at 729 MHz.
 
|-
 
|-
| PMIC@100C || Temperature of power management integrated circuit
+
| VIC_FREQ 0%@729 || The video image compositor has a 0% load and is running at 729 MHz.
 
|-
 
|-
| GPU 0/10 || 0=Current GPU power consumption, 10=Average GPU power consumption
+
| APE 233 || The Audio Processing Engine is running at 233 MHz.
 
|-
 
|-
| CPU 210/216 || 210=Current CPU power consumption, 216=Average CPU power consumption
+
| CV0@-256C || CV0_POD with a temperature of 256 Celsius degrees.
 
|-
 
|-
| SOC 860/864 || 860=Current System on Chip power consumption, 864=Average System on Chip power consumption
+
| CPU@53.562C || CPU with a temperature of 53.262 Celsius degrees.
 
|-
 
|-
| CV 0/0 || 140=Current PVA and DL  power consumption, 144=Average PVA and DL power consumption
+
| GPU@48.468C || GPU with a temperature of 48.468 Celsius degrees.
 
|-
 
|-
| VDDRQ 140/144 || 140=Current DDR power consumption, 144=Average DDR power consumption
+
| VDD_GPU_SOC 7968mW/7969mW || GPU SOC current power consumption is 7968 mW and the average power consumption is 7968 mW.
 
|-
 
|-
| SYS5V 1880/1889 || 1880=Current system 5V power consumption, 1889=Average system 5V power consumption
 
 
|}
 
|}
  
 
<noinclude>
 
<noinclude>
{{NVIDIA Jetson Orin/Foot|JetPack 4.1/Performance Tuning|JetPack 4.1‎/Performance Tuning/Set Values Manually}}
+
{{NVIDIA Jetson Orin/Foot|JetPack 5.0.2/Performance Tuning|JetPack 5.0‎.2/Performance Tuning/Set Values Manually}}
 
</noinclude>
 
</noinclude>

Latest revision as of 19:30, 10 February 2023



Previous: JetPack 5.0.2/Performance Tuning Index Next: JetPack 5.0.2‎/Performance Tuning/Set Values Manually


Nvidia-preferred-partner-badge-rgb-for-screen.png





As developers, we often need to measure CPU, GPU, and memory usage to budget the applications that need to run in our projects. NVIDIA provides the tegrastats tool to extract these and other important metrics in Jetson platforms. This section provides an overview of the usage of tegrastats.

tegrastats

tegrastats is a tool that reports memory usage, GPU usage, CPU usage, and SOC temperature for Tegra-based devices. Tegrastats comes installed in the sample root filesystem provided in Jetpack, and it's located in the Orin AGX system path /usr/bin, so it can be launched from any location in the filesystem. To launch tegrastats, simply run the binary with privileges:

sudo tegrastats

This command will start printing the system stats each second, an example of the expected output can be found in the next subsection. If you need to customize the tegrastats behavior, the binary provides the following command-line options:

Usage: tegrastats [-option]
Options:
    --help                  : print this help screen
    --interval <millisec>   : sample the information in <milliseconds>
    --logfile  <filename>   : dump the output of tegrastats to <filename>
    --load_cfg <filename>   : load the information from <filename>
    --readall               : collect all stats including performance intensive stats
    --save_cfg <filename>   : save the information to <filename>
    --start                 : run tegrastats as a daemon process in the background
    --stop                  : stop any running instances of tegrastats
    --verbose               : print verbose message

tegrastats Output

You can find below an example of the output printed by tegrastats in the Orin AGX and Table 1 providing a description to help interpret some of the metrics provided by tegrastats.

07-21-2022 20:40:24 RAM 5059/30623MB (lfb 5843x4MB) SWAP 0/15311MB (cached 0MB) CPU [15%@735,12%@729,5%@729,10%@729,10%@710,6%@726,6%@729,6%@725,6%@2189,11%@726,5%@1932,8%@853] EMC_FREQ 5%@3199 GR3D_FREQ 0%@114 GR3D2_FREQ 0%@114 NVENC 115 NVDEC 998 NVJPG 729 NVJPG1 729 VIC_FREQ 0%@729 APE 233 CV0@-256C CPU@53.562C Tdiode@43.25C SOC2@49.218C SOC0@50.437C CV1@-256C GPU@48.468C SOC1@49.156C CV2@-256C VDD_GPU_SOC 7968mW/7969mW VDD_CPU_CV 2391mW/2391mW VIN_SYS_5V0 5266mW/5266mW NC 0mW/0mW VDDQ_VDD2_1V8AO 1415mW/1415mW NC 0mW/0mW



Table 1: tegrastats interpretation
Statistic Description
RAM 5059/30623MB (lfb 5843x4MB) (lfb 5844x4MB) 5059 MB of RAM are in use, 30623 MB of RAM is available for applications and there are 5843 blocks of size 4 MB (the largest free block size or lfb) that can be allocated.
SWAP 0/15311MB (cached 0MB) 0 MB of SWAP used, 15311 MB of SWAP available for applications, and 0 MB of SWAP cached.
CPU [15%@735,...,8%@853] Each A@B value is a statistic for one of the CPUs. The first CPU in the example has a load of 15% and is running at 735 MHz. The CPU load can also show as off if it's powered down.
EMC_FREQ 5%@3199 5% of the External Memory Controller bandwidth is used, and it's running at 3199 MHz.
GR3D_FREQ 0%@114 The first GPU engine has 0% of usage and is running at 114 MHz.
GR3D2_FREQ 0%@114 The second GPU engine has 0% of usage and is running at 114 MHz.
NVENC 115 The NVIDIA Video Encoder Engine is running at 115 MHz.
NVDEC 998 The NVIDIA Video Decoder Engine is running at 998 MHz.
NVJPG 729 The first NVIDIA JPEG Engine is running at 729 MHz.
NVJPG1 729 The second NVIDIA JPEG Engine is running at 729 MHz.
VIC_FREQ 0%@729 The video image compositor has a 0% load and is running at 729 MHz.
APE 233 The Audio Processing Engine is running at 233 MHz.
CV0@-256C CV0_POD with a temperature of 256 Celsius degrees.
CPU@53.562C CPU with a temperature of 53.262 Celsius degrees.
GPU@48.468C GPU with a temperature of 48.468 Celsius degrees.
VDD_GPU_SOC 7968mW/7969mW GPU SOC current power consumption is 7968 mW and the average power consumption is 7968 mW.



Previous: JetPack 5.0.2/Performance Tuning Index Next: JetPack 5.0‎.2/Performance Tuning/Set Values Manually