NVIDIA Jetson AGX Thor - Set Values Manually

From RidgeRun Developer Wiki

NVIDIA Jetson AGX Thor/Head

Follow Us On Twitter LinkedIn Email Share this page



Previous: JetPack_7.0/Performance_Tuning/Evaluating_Performance Index Next: JetPack_7.0/Performance_Tuning/Tuning_Power









Performance tuning by setting the CPU, GPU, and Frequency values manually

This section provides information on how to manage the number of active CPUs and the CPU, GPU, and External Memory Controller frequencies.

Manage CPU State

A Jetson Thor device contains 14 CPU clusters in 7 cluster pairs. Each of the 14 clusters can be individually turned on or off during runtime to save CPU power.

ls -v /sys/devices/system/cpu | grep cpu[0-9]
cpu0
cpu1
cpu2
cpu3
cpu4
cpu5
cpu6
cpu7
cpu8
cpu9
cpu10
cpu11
cpu12
cpu13

Make sure to replace <cpu#> with one of the CPU devices available in your system, for instance, cpu4.

The following table shows how you can manage the CPU.

Table 1: CPU Management commands for any cpu#
CPU Management Command
Check status
cat /sys/devices/system/cpu/<cpu#>/online
Turn on
echo 1 > /sys/devices/system/cpu/cpu#/online
Turn off
echo 0 > /sys/devices/system/cpu/cpu#/online

CPU Frequency

Jetson AGX Thor lets you achieve maximum and consistent CPU performance, you can switch to the performance governor, which disables CPU DVFS and locks all CPU clusters at their maximum frequency.

echo performance > /sys/devices/system/cpu/cpufreq/policy<x>/scaling_governor

In the following table you can check how to extract the current values and also how to update it for your preference.

Table 2: CPU Frecuency commands
Frequency CPU Boundary Command
Maximum CPU frequency Check status
cat /sys/devices/system/cpu/cpufreq/policy<x>/scaling_max_freq
Change Boundary
 echo <KHz> > /sys/devices/system/cpu/cpufreq/policy<x>/scaling_max_freq
Minimum CPU frequency Check status
cat /sys/devices/system/cpu/cpufreq/policy<x>/scaling_min_freq
Change Boundary
echo <KHz> > /sys/devices/system/cpu/cpufreq/policy<x>/scaling_min_freq

GPU Management

If you want to modify the performance of the GPU you can set your desire frequency as well as the power.

GPU Power Management

If you want to turn off the GPU when idle, then enable the feature Rail-Gating. Beforehand, you can check if this feature is enabled as follows.

cat /proc/driver/nvidia/gpus/0000:01:00.0/power | grep "Rail-Gating"

Rail-Gating will increase the wake-up latency. You can disable this feature as follows.

echo on > /sys/bus/pci/devices/0000:01:00.0/power/control

If you want to enable to save power consumption then use the following command.

echo auto > /sys/bus/pci/devices/0000:01:00.0/power/control

GPU Frequency

Jetson AGX Thor has two main clock domains exposed through the Linux devfreq framework. GPC manages performance for compute and graphics tasks, while NVD manages performance for multimedia tasks like video encoding/decoding, JPEG processing, and OFA.

For setting up to maximum performance use the following command for each clock respectively:

cd /sys/class/devfreq/gpu-gpc-0/nvhost_podgov
cd /sys/class/devfreq/gpu-nvd-0/nvhost_podgov

Inside of each folder you will find the following content.

down_freq_margin  k  load_margin  load_max  load_target  up_freq_margin


Documentation
You can find more information on how modify the parameters above in Jetson Thor Product Family docs


For maximum performance, you can disable dynamic scaling by switching to the performance governor:

echo performance > /sys/class/devfreq/gpu-gpc-0/governor
echo performance > /sys/class/devfreq/gpu-nvd-0/governor

Memory Management

Info
NVIDIA SoC chipsets include power-saving features that are invisible during runtime, set at boot through the BCT, along with board-specific DVFS tables for dynamic voltage and frequency scaling of memory.

Memory Bandwidth QoS Requests From Clients

GPU, PCIe, and display drivers can ask the BPMP firmware for average or peak bandwidth, and you can check each client’s requests in the debugfs node as follows.

cat /sys/kernel/debug/bpmp/debug/bwmgr/bw_request_status


Documentation
More details of the output in the NVIDIA Jetson Thor Documentation


Memory Frequency

With the following command you can check the minimum and maximum clock rates of a specific clock.

cat /sys/kernel/debug/bpmp/debug/clk/emc/min_rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/max_rate
cat /sys/kernel/debug/bpmp/debug/clk/emc/rate

For example to set up the EMNC to an specific and locked frequency you can do so by the following command.

sudo sh -c "echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked"
sudo sh -c "echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/state"
sudo sh -c "echo 665600000 > /sys/kernel/debug/bpmp/debug/clk/emc/rate"

As well you can set up de max rate and min rate.

EMC_FREQ=2133000000
sudo sh -c "echo $EMC_FREQ > /sys/kernel/debug/bpmp/debug/clk/emc/max_rate"
sudo sh -c "echo $EMC_FREQ > /sys/kernel/debug/bpmp/debug/clk/emc/min_rate"


Info
Where EMC_FREQ in kHz is the value available in: /sys/kernel/debug/bpmp/debug/emc/tables/regular



Previous: JetPack_7.0/Performance_Tuning/Evaluating_Performance Index Next: JetPack_7.0/Performance_Tuning/Tuning_Power