cpupower
cpupower is a powerful Linux command-line suite designed to inspect and tune CPU power-saving features, such as frequency scaling (cpufreq) and idle states (cpuidle)
First fo all we must be sure that we are allowed to use cpupower and following setting should be set to
$ zgrep CPU_FREQ /proc/config.gz
CONFIG_ACPI_CPU_FREQ_PSS=y
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_ATTR_SET=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
Dump frequency info of cpu
cpupower frequency-info
Get idle info of cpu
cpupower idle-info
Get cpupower powercap info
cpupower powercap-info
Get cpupower info (require root)
cpupower info
Monitor cpu info
cpupower monitor
Set cpupower frequency-set to performance
cpupower frequency-set -g performance
Set cpu perfomance for scaling governor without cpupower
echo performance | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Dump current setting for scaling_governor
cpupower frequency-info | grep "The governor"
Dump current setting for scaling_governor without cpupower
cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
Set current scaling_governor permanent
- Enable cpupower by rc-update at boot"
rc-update add cpupower default
Set perfomance to be default by edit configuration file
vim /etc/conf.d/cpupower