NVIDIA Jetson Xavier - Performance Tuning by Setting CPU, GPU, and Frequency Values Manually
Manage CPU State
The Tegra will always boot from one CPU denominated the master CPU, this cannot be turned off, and all other CPUs can be turned off.
To manually turn on/off slave CPUs
1) Run the following command to turn on the slave CPU:
CPU=cpu1 #The number can be changed from 1-7 echo 1 > /sys/devices/system/cpu/$CPU/online
2) Run the following command to turn the slave CPU off:
echo 0 > /sys/devices/system/cpu/$CPU/online
To check the CPU state run the following commands:
cat /sys/devices/system/cpu/$CPU/online
3D Frequency Scaling
Frequency scaling allows the Tegra to change the CPU frequency according to the load in order to reduce power consumption, 3D frequency scaling is enabled by default.
To disable 3D frequency scaling run the following command:
echo 0 > /sys/devices/17000000.gv11b/enable_3d_scaling
To enable 3D frequency scaling run the following command:
echo 1 > /sys/devices/17000000.gv11b/enable_3d_scaling
Change CPU Frequency
To print the CPU lower boundary, upper boundary, and current frequency run the following commands:
CPU=cpu1 #The number can be changed cat /sys/devices/system/cpu/$CPU/cpufreq/cpuinfo_min_freq cat /sys/devices/system/cpu/$CPU/cpufreq/cpuinfo_max_freq cat /sys/devices/system/cpu/$CPU/cpufreq/cpuinfo_cur_freq
To change the CPU upper boundary run the following command:
CPU_FREQ=115200 CPU=cpu1 #The number can be changed echo $CPU_FREQ > /sys/devices/system/cpu/$CPU/cpufreq/scaling_max_freq
To change the CPU lower boundary run the following command:
CPU_FREQ=2265600 CPU=cpu1 #The number can be changed echo $CPU_FREQ > /sys/devices/system/cpu/$CPU/cpufreq/scaling_min_freq
To set the static CPU frequency run the following commands:
CPU_FREQ=2265600 CPU=cpu1 #The number can be changed echo $CPU_FREQ > /sys/devices/system/cpu/$CPU/cpufreq/scaling_min_freq echo $CPU_FREQ > /sys/devices/system/cpu/$CPU/cpufreq/scaling_max_freq
Where CPU_FREQ must be among the values in
/sys/devices/system/cpu/$CPU/cpufreq/scaling_available_frequencies
Change GPU Frequency
To print the GPU lower boundary, upper boundary, and current frequency run the following commands:
cat /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/min_freq cat /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/max_freq cat /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/cur_freq
To change the GPU upper boundary run the following command:
GPU_FREQ=675750000 echo $GPU_FREQ > /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/max_freq
To change the GPU lower boundary run the following command:
GPU_FREQ=114750000 echo $GPU_FREQ > /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/min_freq
To set the static GPU frequency run the following command:
GPU_FREQ=675750000 echo $GPU_FREQ > /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/min_freq echo $GPU_FREQ > /sys/devices/17000000.gv11b/devfreq/17000000.gv11b/max_freq
Where GPU_FREQ is the value available in:
/sys/devices/17000000.gv11b/devfreq/17000000.gv11b/available_frequencies
Change Memory Frequency
echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/state echo 665600000 > /sys/kernel/debug/bpmp/debug/clk/emc/rate
To print the EMC lower boundary, upper boundary, and current frequency run the following commands:
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
To change the EMC upper boundary run the following command:
EMC_FREQ=2133000000 echo $EMC_FREQ > /sys/kernel/debug/bpmp/debug/clk/emc/max_rate
To change the EMC lower boundary run the following command:
EMC_FREQ=204000000 echo $EMC_FREQ > /sys/kernel/debug/bpmp/debug/clk/emc/min_rate
To set static EMC frequency run the following commands:
EMC_FREQ=2133000000 echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/mrq_rate_locked echo 1 > /sys/kernel/debug/bpmp/debug/clk/emc/state echo $EMC_FREQ > /sys/kernel/debug/bpmp/debug/clk/emc/rate
Where EMC_FREQ in kHz is the value available in:
/sys/kernel/debug/bpmp/debug/emc/tables/regular/