Created
April 1, 2014 04:18
-
-
Save jynik/9907605 to your computer and use it in GitHub Desktop.
Set all CPU frequency scaling governors to 'performance'
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/sh | |
# | |
# Set frequency scaling governer to 'performance' on all cores | |
set -e | |
GOVERNOR=performance | |
SYS_PATH=/sys/devices/system/cpu | |
for cpu in `ls $SYS_PATH | grep 'cpu[0-9]\+'`; do | |
CPU_SCALING_GOVERNOR=$SYS_PATH/$cpu/cpufreq/scaling_governor | |
current=`cat $CPU_SCALING_GOVERNOR` | |
echo "$cpu is currently '$current', setting to 'performance'" | |
echo $GOVERNOR | sudo tee -a $CPU_SCALING_GOVERNOR > /dev/null | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment