Azitech

Azimout's Linux weblog

cpufreq

with one comment

your cpu does not always run at full speed, for power savings reasons. this is called frequency scaling. the reference in linux kernel documentation is here

to see the frequencies your cpu(s) can be set to, run:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_frequencies

a cpufreq governor decides what frequency to use at each moment. to list available governors, run:

cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_available_governors

to set a different governor, e.g. “performance” run:

echo “performance” > scaling_governor or sudo cpufreq-selector -g performance

a nice tool is the acpitool (in universe):

  • acpitool -B prints battery info
  • acpitool -c prints processor info

if you set the governor to “userspace”, then you can use powernowd to manage the cpu…

jaunty’s kernel has all the governors compiled-in, so no modprobing is necessary. you can see from grep -i cpu_freq /boot/config-`uname -r`:

CONFIG_CPU_FREQ=y
# CONFIG_CPU_FREQ_DEBUG is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=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_GOV_CONSERVATIVE=y
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
CONFIG_CPU_FREQ_GOV_USERSPACE=y
CONFIG_CPU_FREQ_STAT=y
CONFIG_CPU_FREQ_STAT_DETAILS=y
CONFIG_CPU_FREQ_TABLE=y

then there’s also the gnome cpufreq-applet, but in my case it seems read-only

Advertisements

Written by azimout

09/03/2009 at 13:00

Posted in Reference

One Response

Subscribe to comments with RSS.

  1. the only sensible governor is ‘ondemand’, you may want to read http://mjg59.livejournal.com/101706.html and some more he wrote.

    mattis

    09/03/2009 at 17:27


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: