User:Stefanwilkens

From ArchWiki
Revision as of 09:07, 3 October 2012 by Stefanwilkens (Talk | contribs)

Jump to: navigation, search

Currently: rewrite of CPU_Frequency_Scaling#CPU_frequency_driver


Template:Article summary start Template:Article summary text Template:Article summary heading Template:Article summary end

CPU frequency scaling enables the operating system to scale the CPU speed up or down in order to save power. CPU frequencies can be scaled automatically depending on the system load, in response to ACPI events, or manually by userspace programs.

Tip: Since kernel 3.4 the necessary CPU frequency driver modules are loaded automatically and the recommended ondemand governor is enabled by default. User-space applications like cpupower, acpid, laptop-mode-tools, or GUI tools provided for your desktop environment, may still be used for advanced configuration.

Configuration

Configuration of CPU frequency scaling is done through three mechanics:

  • The CPU frequency driver
  • The scaling governor
  • Fine-tuning of the governor through user-space tools

Since kernel 3.4 the necessary CPU frequency driver modules are loaded automatically and the recommended ondemand governor is enabled by default. This leaves the user with a functional, on-demand, CPU frequency scaling setup requiring no intervention from user-space.

User-space applications like cpupower, acpid, laptop-mode-tools, or GUI tools provided for your desktop environment, may still be used for advanced configuration.

The CPU frequency driver

In order for frequency scaling to work properly, the operating system must first know the CPU(s) specification. To accomplish this, a kernel module must be loaded that can read and manage the CPU p(ower)-states.

Note: These modules may need related features enabled in BIOS which may be labeled as: Speedstep, Cool and Quiet, PowerNow!, or ACPI. Consult your BIOS documentation.
Tip: Since 3.4, the kernel will determine and load the appropriate driver module.

Available drivers

acpi_cpufreq 
CPUFreq driver which utilizes the ACPI Processor Performance States. This driver also supports Intel Enhanced SpeedStep (previously supported by the deprecated speedstep-centrino module).
speedstep-ich 
CPUFreq driver for certain mobile Intel Pentium III (Coppermine), all mobile Intel Pentium III-M (Tualatin) and all mobile Intel Pentium 4 P4-M on systems which have an Intel ICH2, ICH3 or ICH4 southbridge.
speedstep-smi 
CPUFreq driver for certain mobile Intel Pentium III (Coppermine), all mobile Intel Pentium III-M (Tualatin) on systems which have an Intel 440BX/ZX/MX southbridge.
powernow-k8 
CPUFreq driver for K8/K10 Athlon64/Opteron/Phenom processors.
powernow-k7 
CPUFreq driver for mobile AMD K7 mobile processors.
cpufreq-nforce2 
CPUFreq driver for FSB changing on nVidia nForce2 platforms. (AMD K7, Socket A)
pcc-cpufreq 
This driver supports Processor Clocking Control interface by Hewlett-Packard and Microsoft Corporation which is useful on some Proliant servers.
p4_clockmod 
CPUFreq driver for Intel Pentium 4 / Xeon / Celeron processors. When enabled it will lower CPU temperature by skipping clocks. You probably want to use a Speedstep driver instead.

Scaling governors

Governors can be thought of as pre-configured power schemes for the CPU. Some of the governors must be loaded as kernel modules in order to be seen by user space programs. Users can load as many governors as desired, only one will be active on a CPU at any given time.

For Desktops and most systems, the ondemand governor can provide the best compromise between heat emission, power consumption, performance, and manageability. For Laptops or other mobile systems, the conservative governor can provide significant savings in power consumption.

Tip: Since kernel 3.4, the cpufreq_ondemand governor is loaded by default.

Available governors:

cpufreq_ondemand
Dynamically switches between the CPU(s) available clock speeds based on system load
cpufreq_performance
The performance governor runs the CPU(s) at maximum clock speed
cpufreq_conservative
Similar to ondemand, but the CPU(s) clock speed switches gradually through all its available frequencies based on system load
cpufreq_powersave
Runs the CPU(s) at minimum speed
cpufreq_userspace
Manually configured clock speeds by user

The governors ondemand and performance are built into the kernel and do not need to be loaded as modules to be activated. If you want to use one of the other governors, you have to load them with modprobe. For example:

# modprobe cpufreq_powersave
# modprobe cpufreq_userspace

Or, add a file specifying the desired governor(s) to /etc/modules-load.d/ and reboot.

/etc/modules-load.d/cpufreq_gov.conf
# Load cpufreq governors
cpufreq_powersave
cpufreq_userspace

Fine-tuning governors

Improving on-demand performance

Changing the on-demand governor's threshold

On-demand governor sampling_down_factor

Tuning conservative governor

etc.

User-space tools

Changing the CPU frequency scaling properties from the defaults set during boot can be done through several user-space tools.

cpupower

cpudyn

http://freecode.com/projects/cpudyn

laptop-mode

Troubleshooting

External Links