CPU Frequency scaling
Configuring Hardware - CPU Frequency scaling
Most modern CPUs have the ability to run at lower frequencies than maximum. Multi-core processors now provide the ability to utilize a single core for a specific thread or process, leaving the remaining cores drawing full power even if they aren't on load. Implementing CPU frequency scaling is an excellent way to reduce your power bill while running your desktop, or battery life if you are running a laptop. Having already installed a System Monitor such as conky before taking these steps will allow you to see graphically, in real time, how your processor reacts to the changes you're making. You'll also need to ensure both the governors you require (such as ondemand and powersave) are configured in the ACPI section of the kernel. When you are ready, emerge sys-power/cpufrequtils.
$ sudo emerge -av cpufrequtils
Once emerged, you can see what steps are available to your processor using cpufreq-info.
$ sudo cpufreq-info
The output should be similar for each core if you have a multi-core CPU, but chances are you'll see something like this:
hardware limits: 1.20 GHz - 2.53 GHz available frequency steps: 2.53 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz, 1.47 GHz, 1.33 GHz, 1.20 GHz
Using cpufreq-set, you can now throttle your CPU using any of the governors you've configured in your kernel. For most systems, the ondemand governor should be sufficient: it throttles down your CPU when idle, and kicks it up when you need it, such as when gaming, running a virtual machine, or performing an emerge.
$ sudo cpufreq-set -g ondemand
You can also set your CPU to one of the frequency steps listed in cpufreq-info.
$ sudo cpufreq-set -f 2.13ghz
In order to set your desired CPU frequency at startup, be sure to add the appropriate command to /etc/conf.d/local.start. In the example below, replace cputfreq-set -g ondemand to whatever you desire.
$ sudo nano -w /etc/conf.d/local.start
Ensure the file contains the following directive:
# set the cpu frequency governor to "ondemand" to save power cpufreq-set -g ondemand