Power management/Processor/ru
Эта статья описывает настройку управления питанием для процессоров.
Изменение частоты процессора
Изменение частоты процессора — это метод, в котором частота процессора может быть автоматически изменена "на лету" для сохранения энергии, а также это уменьшит количество выделяемого чипом тепла.
Установка
BIOS
Некоторые функции могут быть включены или отключены в BIOS. Убедитесь, что следующие включены:
- "Processor C1E support"
- "Enhanced Speedstep (EIST)"
Ядро
Активируйте следующие параметры ядра:
Power management and ACPI options ---> [*] ACPI (Advanced Configuration and Power Interface) Support ---> <*> Processor CPU Frequency scaling ---> [*] CPU Frequency scaling Default CPUFreq governor (ondemand) ---> Select a default governor; see below table Default is ondemand *** CPU frequency scaling drivers *** Select a driver; see below table
Необходим регулятор, который отвечает за изменение частоты на основании своего профиля:
Option | Module | Supported Processors | Note |
---|---|---|---|
'performance' governor | cpufreq_performance | Sets the frequency statically to the highest available CPU frequency. | For Intel core processors, this should be selected as default. [1] [2] |
'powersave' governor | cpufreq_powersave | Sets the frequency statically to the lowest available CPU frequency. | Can't be set as default. |
'userspace' governor for userspace frequency scaling | cpufreq_userspace | To set the CPU frequency manually or when a userspace program shall be able to set the CPU dynamically. | |
'ondemand' cpufreq policy governor | cpufreq_ondemand | Does a periodic polling and changes frequency based on the CPU utilization. | For processors other than Intel core, this should be selected as default. |
'conservative' cpufreq governor | cpufreq_conservative | Similar to ondemand. The frequency is gracefully increased and decreased rather than jumping to 100% when speed is required. |
Название активного регулятора CPUFreq доступно в: /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_governor
Option | Module | Supported Processors | Note |
---|---|---|---|
Intel P state control | intel_pstate | Newer (SandyBridge+) Intel Core | |
Processor Clocking Control interface driver | pcc-cpufreq | ||
ACPI Processor P-States driver | acpi-cpufreq | Older Intel Core, Intel Atom, Intel Pentium M | |
AMD Opteron/Athlon64 PowerNow! | powernow-k8 | AMD Opteron, AMD Athlon 64, AMD Turion 64 | |
Intel Enhanced SpeedStep (deprecated) | speedstep-centrino | Intel Pentium M (Centrino), Intel Xeon | Deprecated, use ACPI Processor P-States driver instead |
Intel Pentium 4 clock modulation | p4-clockmod | Intel Pentium 4, Intel XEON | Causes severe slowdowns and noticeable latencies |
Тики
Процессор сохраняет больше всего энергии, когда дольше остаётся в режимах энергосбережения, поэтому уменьшим количество тактов, которые его пробуждают. Подробности о доступных бестактовых режимах могут быть найдены в документации ядра.
Установка
BIOS
Некоторые функции могут быть включены или отключены в BIOS. Убедитесь, что следующие включены:
- "HPET"
- "Multimedia timer"
Ядро
Активируйте следующие параметры ядра:
Processor type and features ---> [*] Tickless System (Dynamic Ticks) [*] High Resolution Timer Support [*] HPET Timer Support
Эти параметры теперь находятся в "General setup" -> "Timers subsystem".
PowerTOP
PowerTOP – это утилита, предназначенная для измерения, объяснения и уменьшения электропотребления компьютера.
Когда она запускается, она сортирует запущенные процессы в порядке того, как часто они пробуждают процессор. Для подробностей об установке, настройке и использовании см. отдельную статью PowerTOP.
Hprofile
Можно изменять активный регулятор CPU, используя простую команду:
root #
for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do
echo ondemand >$c/cpufreq/scaling_governor; done
Прочтите /etc/local.d/README, чтобы узнать, как выполнять эту команду во время загрузки.
Applications such as sys-power/cpupower do little more than the above but with some interface on top of it. However, having to run certain commands as root depending on the system usage is not efficient for most users. It is better to automate some of the decisions of governing CPU frequency. For instance, when not wired to AC power, most users would like to have the system in a power saving mode.
This is where Hprofile comes into play. Please refer to its article for more information and configuration.
Смотрите также
- ACPI — система управления питанием, являющаяся частью BIOS.
Внешние ресурсы
- What exactly is a P-state? (Pt. 1) - An Intel article (kind of) explaining P-states.
- Linux's "Ondemand" Governor Is No Longer Fit - Explains why ondemand should not be used for newer Intel core processors.
Ссылки
- ↑ Dominik Brodowski. Intel P-State driver, CPU frequency and voltage scaling code in the Linux(TM) kernel. Retrieved 12 June 2016.
- ↑ Michael Larabel. Linux's "Ondemand" Governor Is No Longer Fit. Retrieved 15 October 2016.