電源/CPU管理
CPUの周波数スケーリング
CPU周波数スケーリングは、プロセッサの周波数を自動的に電力を節約するために、チップの発熱量を低減するために、「オンザフライ」で調整することができる技術です。
インストール
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
プロファイルに基づいて周波数を変える役割を持つガバナーというものが必要になります。
オプション | モジュール | サポートされるCPU | 備考 |
---|---|---|---|
'performance' ガバナー | cpufreq_performance | 常にCPUで利用できる最も高い周波数に固定します。 | IntelのCPUに対して、このオプションはデフォルトとして設定されるべきです。[1] [2] |
'powersave' ガバナー | cpufreq_powersave | 常にCPUで利用できる最も低い周波数に固定します。 | デフォルトとして設定できません。 |
'userspace' ガバナー:userspaceにおける周波数スケーリング | cpufreq_userspace | 周波数を手動で設定するとき、もしくはuserspaceのプログラムが動的にCPU周波数を変更できるようにする時に設定します。 | |
'ondemand' 周波数ポリシーガバナー | cpufreq_ondemand | CPUの利用状況に応じて定期的に周波数を変更します。 | Intel以外のCPUに対して、このオプションがデフォルトとして設定されるべきです。 |
'conservative' 周波数ポガバナー | cpufreq_conservative | 'ondemand'に似ています。高い処理速度が要求された時に、100%に直接ジャンプするのではなく段階的に周波数を上げるように、なめらかに周波数を上下させます。 |
使用しているガバナーは次のファイルを参照することで確認できます。: /sys/devices/system/cpu/cpu[0-9]*/cpufreq/scaling_governor
オプション | モジュール | サポートされるCPU | 備考 |
---|---|---|---|
Intel P state control | intel_pstate | SandyBridgeよりも新しいIntel Core | |
Processor Clocking Control interface driver | pcc-cpufreq | ||
ACPI Processor P-States driver | acpi-cpufreq | 古い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 | 問題があります, ACPI Processor P-States driverを代わりに使用してください。 |
Intel Pentium 4 clock modulation | p4-clockmod | Intel Pentium 4, Intel XEON | 深刻な低速化と認知可能なほどの遅延の原因となります。 |
ティック
The processor saves the most energy when the processor stays longer in power savings mode, so reduce the amount of ticks that wakes the processor up. Details about the available tickless modes can be found in the kernel documentation.
インストール
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 は、コンピュータの電力消費を計測し、説明し、最小化するために設計されたユーティリティです。
When it is run, it sorts the running processes in order of how often they cause the processor to wake up. For details on installation, configuration and usage see the separate PowerTOP article.
Hprofile
It is possible to change the active CPU governor using a simple command:
root #
for c in $(ls -d /sys/devices/system/cpu/cpu[0-9]*); do
echo ondemand >$c/cpufreq/scaling_governor; done
Read /etc/local.d/README to learn how to execute this command on startup.
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.
参考
外部資料
- 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.