Jetson Performance Tweaks

This guide covers key performance optimizations for the Jetson platform, including power settings, CPU governors, and real-time priority settings.

Power Management

Per default the Jetson platform is configured to use the “balanced” power mode.For best performance, we recommend to use the “max-performance” power mode as described below.

You can view the current settings with:

# Check current power modesudonvpmodel-q# View detailed configurationsudonvpmodel-q--verbose

To optimize the power settings, run:

# Set maximum performance mode (50W)sudonvpmodel-m0# Verify changessudonvpmodel-q

The CPU governor controls how the processor scales frequency based on load. Setting it to “performance” ensures maximum processing speed.

# on AGX Orinsudocpufreq-set-c0-gperformancesudocpufreq-set-c4-gperformancesudocpufreq-set-c8-gperformance# on AGX Thorsudocpufreq-set-c0-gperformancesudocpufreq-set-c2-gperformancesudocpufreq-set-c4-gperformancesudocpufreq-set-c6-gperformancesudocpufreq-set-c8-gperformancesudocpufreq-set-c10-gperformancesudocpufreq-set-c12-gperformance

To make these changes persistent across reboots, modify/etc/nvpmodel.conf to set the default power mode, and create/etc/default/cpufrequtils to set the CPU governor. This can also be done as follows:

# on AGX Orinsudosed-i's|< PM_CONFIG DEFAULT=2 >|< PM_CONFIG DEFAULT=0 >|'/etc/nvpmodel.conf# on AGX Thorsudosed-i's|< PM_CONFIG DEFAULT=1 >|< PM_CONFIG DEFAULT=0 >|'/etc/nvpmodel.confecho'GOVERNOR="performance"'|tee/etc/default/cpufrequtils

Default System Mode

The Ubuntu system in the Jetson ships with booting on graphical mode by default. This consumes resources that can be better used elsewhere. You can switch the default to be multi user command line in order to free these resources.

# check current system runlevel targetsystemctlget-default# change default to multi-user (non-GUI)sudosystemctlset-defaultmulti-user.target# change current running system to multi-usersudosystemctlisolatemulti-user.target### If you want to go back to graphical mode:# change current running system back to GUIsudosystemctlisolategraphical.target# change default back to GUIsudosystemctlset-defaultgraphical.target

Note this is mostly relevant for the Jetson Orin Nano Super.

Real-Time Scheduling

The signal processing latency is critical for the 5G stack.We recommend to use the following configuration to further reduce the latency induced by the scheduler.

Create USRP group and add user:

sudogroupaddusrpsudousermod-aGusrp$USER

Add real-time priority limits by creating/editing/etc/security/limits.conf:

@usrp - rtprio 99

Configure kernel real-time scheduling:

# Check current settingcat/proc/sys/kernel/sched_rt_runtime_us# Remove runtime limitsudosu-echo-1>/proc/sys/kernel/sched_rt_runtime_us

Note

Log out and back in for group changes to take effect. A system reboot may be required for some changes.

Verifying Settings

# Check CPU frequenciescat/sys/devices/system/cpu/cpu*/cpufreq/scaling_cur_freq# Check CPU governorscat/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor# Check real-time limitsulimit-r