NVIDIA Jetson Orin - Evaluating Performance
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
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. |