|
Size: 3867
Comment: /etc/default/cpufrequtils is no longer installed ("the defaults values are in the script now").
|
Size: 4202
Comment: Link online documentation directly, amend InterWiki, add CategoryHardware, formatting.
|
| Deletions are marked like this. | Additions are marked like this. |
| Line 2: | Line 2: |
| ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: none-~ ---- = CPU frequency scaling = |
|
| Line 5: | Line 8: |
| == Howto enable Cpu Frequency Scaling == | The [[http://kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html|Linux kernel CPUfreq subsystem]] provides this ability on Debian Linux systems. |
| Line 7: | Line 10: |
| Note: In most cases, this should be enable automatically, during Debian installation. | == Enabling == |
| Line 9: | Line 12: |
| Install the DebPkg:cpufrequtils package:{{{ | Note: In most cases, this should be enabled automatically during Debian installation. Install the DebianPkg:cpufrequtils package:{{{ |
| Line 14: | Line 19: |
| Line 15: | Line 21: |
| Either add "CPU Frequency Scaling Monitor" to your Gnome panel, or run the command {{{cpufreq-info}}}, which prints one bloc like this per core: {{{ |
Either add "CPU Frequency Scaling Monitor" to your GNOME panel, or run the command {{{cpufreq-info}}}, which prints one block like this per core: {{{ |
| Line 29: | Line 35: |
| There are two important information: | There are two important pieces of information: |
| Line 31: | Line 39: |
| * The statement {{{current CPU frequency is XXXX MHz}}}, If XXXX is lower than maximum speed, it probably means that it's working. | * The statement {{{current CPU frequency is XXXX MHz}}}; if XXXX is lower than maximum speed, it probably means that it's working. |
| Line 34: | Line 42: |
| The [cpufreq] governor decides what frequency should be used (it uses the cpufreq driver to actually switch the CPU's policy). | |
| Line 36: | Line 43: |
| The governor decides what frequency should be used (it uses the CPUFreq driver to actually switch the CPU's policy). As explained above, since Lenny, the CPUFreq modules should be loaded using DebianPkg:cpufrequtils. | |
| Line 37: | Line 45: |
| As explained above, since Lenny, the cpufreq modules should be loaded using DebPkg:cpufrequtils. | In most cases, {{{ondemand}}} is the recommended governor. CPUFreq governors are actually modules (even though governors are modules, you should use {{{cpufreq-info}}} to know if the governors are loaded, and which one is active). |
| Line 39: | Line 47: |
| '''Userspace Governors''' | For more information about governors, read governors.txt (available in {{{/usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/}}} from the package [[DebPkg:linux-doc-2.6]], you can read the latest version from [[http://kernel.org/doc/Documentation/cpu-freq/governors.txt|kernel.org]]). |
| Line 41: | Line 49: |
| In most cases, {{{ondemand}}} is the recommended governor. Cpu-freq governors are actually modules (Even though governor are modules, you should use {{{cpufreq-info}}} to know if the governors are loaded, and which one are active). | ==== Userland governors ==== |
| Line 43: | Line 51: |
| '''For more information about governors''' | The userland-based governors (DebianPkg:cpufreqd, DebianPkg:cpudyn, DebianPkg:powersaved, DebianPkg:powernowd ...) are usually not needed any more. |
| Line 45: | Line 53: |
| read governors.txt (available in {{{/usr/share/doc/linux-doc-2.6.26/Documentation/cpu-freq/}}} from the package [[DebPkg:linux-doc-2.6]], you can read the latest version from [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/cpu-freq/governors.txt;hb=HEAD|kernel.org]]). | === Drivers === |
| Line 47: | Line 55: |
| ==== Userspace Governors ==== The userland based governors (DebPkg:cpufreqd, DebPkg:cpudyn, DebPkg:powersaved, DebPkg:powernowd ...) are usually not needed any more. |
As explained above, the governor defines the frequency scaling policy, but it doesn't instruct the CPU to change the speed directly... it needs a driver for that. DebianPkg:cpufrequtils has an init script that should load the appropriate driver at boot time. |
| Line 50: | Line 57: |
| === cpufreq drivers === As explained above, the governor defines the frequency scaling policy, but it doesn't instructs the CPU to change the speed directly... It needs a driver for that. DebPkg:cpufrequtils has an init script that should load the appropriate driver at boot time. The list of cpu-freq drivers available on your system can be obtained by running: |
The list of CPUFreq drivers available on your system can be obtained by running: |
| Line 57: | Line 59: |
| modinfo /lib/modules/$(uname -r)/kernel/arch/*/kernel/cpu/cpufreq/* | grep "^[fd]" | /sbin/modinfo /lib/modules/$(uname -r)/kernel/arch/*/kernel/cpu/cpufreq/* | grep "^[fd]" |
| Line 60: | Line 62: |
| For more information about governors, read cpu-drivers.txt (available in {{{/usr/share/doc/linux-doc-2.6.26/Documentation/cpu-freq/}}} from the package [[DebPkg:linux-doc-2.6]], you can read the latest version from [[http://git.kernel.org/?p=linux/kernel/git/torvalds/linux-2.6.git;a=blob;f=Documentation/cpu-freq/cpu-drivers.txt;hb=HEAD|kernel.org]]). | For more information about governors, read cpu-drivers.txt (available in {{{/usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/}}} from the package [[DebianPkg:linux-doc-2.6]], you can read the latest version from [[http://kernel.org/doc/Documentation/cpu-freq/cpu-drivers.txt|kernel.org]]). |
| Line 62: | Line 64: |
| === See Also === * The documentation in {{{usr/share/doc/linux-doc-2.6.26/Documentation/cpu-freq/}}} * DebPkg:cpufrequtils's documentation (esp. [[DebianMan:1/cpufreq-info|cpufreq-info(1)]] and [[DebianMan:1/cpufreq-set|cpufreq-set(1)]]) * DebPkg:powertop is a tool to check what prevents the kernel from going to sleep mode (also read also [[http://www.lesswatts.org/projects/powertop/]]). |
== See Also == * The documentation in {{{/usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/}}} * DebianPkg:cpufrequtils's documentation (esp. [[DebianMan:1/cpufreq-info|cpufreq-info(1)]] and [[DebianMan:1/cpufreq-set|cpufreq-set(1)]]) * DebianPkg:powertop is a tool to check what prevents the kernel from going to sleep mode (also read http://www.lesswatts.org/projects/powertop). == External Links == * http://kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html * http://kernel.org/doc/Documentation/cpu-freq/governors.txt * http://kernel.org/doc/Documentation/cpu-freq/cpu-drivers.txt ---- CategoryHardware |
Translation(s): none
CPU frequency scaling
Dynamic CPU frequency scaling (also known as CPU throttling) is a technique in computer architecture where a processor is run at a less-than-maximum frequency in order to conserve power (src: Wikipedia).
The Linux kernel CPUfreq subsystem provides this ability on Debian Linux systems.
Enabling
Note: In most cases, this should be enabled automatically during Debian installation.
Install the cpufrequtils package:
aptitude install cpufrequtils
Troubleshooting
Check how CPU is configured
Either add "CPU Frequency Scaling Monitor" to your GNOME panel, or run the command cpufreq-info, which prints one block like this per core:
analyzing CPU 0:
driver: acpi-cpufreq
CPUs which need to switch frequency at the same time: 0
hardware limits: 1000 MHz - 1.83 GHz
available frequency steps: 1.83 GHz, 1.33 GHz, 1000 MHz
available cpufreq governors: userspace, powersave, conservative, ondemand, performance
current policy: frequency should be within 1000 MHz and 1.83 GHz.
The governor "ondemand" may decide which speed to use
within this range.
current CPU frequency is 1000 MHz (asserted by call to hardware).
cpufreq stats: 1.83 GHz:10.34%, 1.33 GHz:0.62%, 1000 MHz:89.04% (1068280)There are two important pieces of information:
The statement The governor "ondemand", which means that this governor is loaded and enabled.
The statement current CPU frequency is XXXX MHz; if XXXX is lower than maximum speed, it probably means that it's working.
Governor ??
The governor decides what frequency should be used (it uses the CPUFreq driver to actually switch the CPU's policy). As explained above, since Lenny, the CPUFreq modules should be loaded using cpufrequtils.
In most cases, ondemand is the recommended governor. CPUFreq governors are actually modules (even though governors are modules, you should use cpufreq-info to know if the governors are loaded, and which one is active).
For more information about governors, read governors.txt (available in /usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/ from the package linux-doc-2.6, you can read the latest version from kernel.org).
Userland governors
The userland-based governors (cpufreqd, cpudyn, powersaved, powernowd ...) are usually not needed any more.
Drivers
As explained above, the governor defines the frequency scaling policy, but it doesn't instruct the CPU to change the speed directly... it needs a driver for that. cpufrequtils has an init script that should load the appropriate driver at boot time.
The list of CPUFreq drivers available on your system can be obtained by running:
/sbin/modinfo /lib/modules/$(uname -r)/kernel/arch/*/kernel/cpu/cpufreq/* | grep "^[fd]"
For more information about governors, read cpu-drivers.txt (available in /usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/ from the package linux-doc-2.6, you can read the latest version from kernel.org).
See Also
The documentation in /usr/share/doc/linux-doc-2.6.32/Documentation/cpu-freq/
cpufrequtils's documentation (esp. cpufreq-info(1) and cpufreq-set(1))
powertop is a tool to check what prevents the kernel from going to sleep mode (also read http://www.lesswatts.org/projects/powertop).
External Links
http://kernel.org/pub/linux/utils/kernel/cpufreq/cpufreq.html
http://kernel.org/doc/Documentation/cpu-freq/cpu-drivers.txt
