Skip to content

Instantly share code, notes, and snippets.

@xlz
Created February 22, 2016 21:20
Show Gist options
  • Save xlz/10ff1434af1ba33f5456 to your computer and use it in GitHub Desktop.
Save xlz/10ff1434af1ba33f5456 to your computer and use it in GitHub Desktop.
Jetson TK1 performance max
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# To obtain full performance on the CPU (eg: for performance measurements or benchmarking or when you don't care about power draw), you can disable CPU scaling and force the 4 main CPU cores to always run at max performance until reboot:
cd /sys/devices/system/cpu
grep -H . cpuquiet/tegra_cpuquiet/enable
grep . cpu?/online
grep . cpu?/cpufreq/scaling_governor
echo 0 >cpuquiet/tegra_cpuquiet/enable
for i in cpu?; do
read online <$i/online
[ "$online" = 1 ] && continue
echo 1 >$i/online
done
for i in cpu?; do
echo performance >$i/cpufreq/scaling_governor
done
grep -H . cpuquiet/tegra_cpuquiet/enable
grep . cpu?/online
grep . cpu?/cpufreq/scaling_governor
#!/bin/sh
# Set CPU to full performance on NVIDIA Jetson TK1 Development Kit
if [ $(id -u) != 0 ]; then
echo "This script requires root permissions"
echo "$ sudo "$0""
exit
fi
# If X11 isn't started, deviceQuery must be run to load GPU drivers
# /home/ubuntu/NVIDIA_CUDA-6.5_Samples/1_Utilities/deviceQuery/deviceQuery >/dev/null 2>&1
cd /sys/kernel/debug/clock
for clock in gbus emc; do
grep -H . $clock/rate
read rates <$clock/possible_rates
for rate in $rates; do
[ "$rate" = '(kHz)' ] && break
max_rate=$rate
done
echo ${max_rate}000 >override.$clock/rate
echo 1 >override.$clock/state
grep . override.$clock/rate override.$clock/state
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment