1-cpu 满负荷
查看cpu 在线情况:
#cat /sys/devices/system/cpu/online
#nproc 查看cpu 的数量
stress -c 6 //这个时候cpu 可以跑满
cpu 也可以进行单独调频
# 查看当前的cpu频率
cat /sys/devices/system/cpu/cpu0/cpufreq/cpuinfo_cur_freq
# 查看可设置的cpu频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies
# 查看最大cpu频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# 更改最大cpu频率
echo 1907200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq
# 查看最小cpu频率
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq
# 更改最小cpu频率
echo 1907200 > /sys/devices/system/cpu/cpu1/cpufreq/scaling_max_freq
# 查看可用的cpu频率模式
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_governor
# 查看当前的cpu频率模式
cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# 设置 性能 频率模式
echo performance > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# 设置 用户态 频率模式
echo userspace > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor
# 如果用户选择了userspace模式, 那么可以设置cpu工作主频率到某一个指定值
echo 1907200 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_setspeed
2- GPU
git clone https://github.com/anseeto/jetson-gpu-burn.git
cd jetson-gpu-burn
make
./gpu_burn 1000
# 查看当前的gpu频率
cat /sys/class/devfreq/17000000.gp10b/cur_freq
# 查看可设置的gpu频率
cat /sys/class/devfreq/17000000.gp10b/available_frequencies
# 查看最大gpu频率
cat /sys/class/devfreq/17000000.gp10b/max_freq
# 更改最大gpu频率
echo 1109250000 > /sys/class/devfreq/17000000.gp10b/max_freq
# 查看最小gpu频率
cat /sys/class/devfreq/17000000.gp10b/min_freq
# 更改最小gpu频率
echo 114750000 > /sys/class/devfreq/17000000.gp10b/min_freq
# 查看可用的gpu频率模式
cat /sys/class/devfreq/17000000.gp10b/available_governors
# 查看当前的gpu频率模式
cat /sys/class/devfreq/17000000.gp10b/governor
# 设置 性能 频率模式
echo performance > /sys/class/devfreq/17000000.gp10b/governor
# 设置 用户 频率模式
echo userspace > /sys/class/devfreq/17000000.gp10b/governor
# 设置目标频率
echo 1109250000 > /sys/class/devfreq/17000000.gp10b/target_freq
3- 查看是否跑满:
tegrastats //也可以在桌面右上角运行
user@linux:~$ sudo jetson_clocks --show
SOC family:tegra194 Machine:NVIDIA Jetson Xavier NX Developer Kit
Online CPUs: 0-5
cpu0: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
cpu1: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
cpu2: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
cpu3: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
cpu4: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
cpu5: Online=1 Governor=schedutil MinFreq=1420800 MaxFreq=1420800 CurrentFreq=1420800 IdleStates: C1=0 c6=0
GPU MinFreq=1109250000 MaxFreq=1109250000 CurrentFreq=1109250000
EMC MinFreq=204000000 MaxFreq=1866000000 CurrentFreq=1866000000 FreqOverride=1
Fan: PWM=255
NV Power Mode: MODE_20W_6CORE
网友评论