NVIDIA Jetson Orin Nano - Evaluating Performance

From RidgeRun Developer Wiki




Previous: Jetpack 5.X/Performance Tuning Index Next: JetPack 5.1.1/Performance Tuning/Set Values Manually







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.

09-08-2022 09:58:42 RAM 796/7337MB (lfb 1530x4MB) SWAP 0/3668MB (cached 0MB) CPU [0%@729,0%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%@W
09-08-2022 09:58:43 RAM 779/7337MB (lfb 1530x4MB) SWAP 0/3668MB (cached 0MB) CPU [0%@1154,2%@729,0%@729,0%@729,0%@729,0%@729] EMC_FREQ 0%W
09-08-2022 09:58:44 RAM 779/7337MB (lfb 1530x4MB) SWAP 0/3668MB (cached 0MB) CPU [2%@1510,2%@1510,1%@729,0%@729,4%@729,2%@729] EMC_FREQ 0W



Table 1: tegrastats interpretation
Statistic Description
RAM 796/7337MB (lfb 1530x4MB) 796 MB of RAM are in use, 7337MB of RAM is available for applications and there are 1530 blocks of size 4 MB (the largest free block size or lfb) that can be allocated.
SWAP 0/3668MB (cached 0MB) 0 MB of SWAP used, 3668 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.1.1/Performance Tuning Index Next: JetPack 5.1‎.1/Performance Tuning/Set Values Manually