Proxmox VEにcpupowerをインストールする

Proxmox VEのホスト鯖は常時起動させているので、
熱とかもろもろ考えて、CPUのクロックなどを下げて運用しようと思います。

CPUの制御をするため「linux-cpupower」をインストール。
「cpupower」ではないので注意。

#apt-get install linux-cpupower

現状の確認。

# pveversion 
pve-manager/9.1.2/9d436f37a0ac4172 (running kernel: 6.17.2-2-pve)
#
# cpupower frequency-info
analyzing CPU 10:
  driver: intel_cpufreq
  CPUs which run at the same hardware frequency: 10
  CPUs which need to have their frequency coordinated by software: 10
  maximum transition latency: 20.0 us
  hardware limits: 1.20 GHz - 3.90 GHz
  available cpufreq governors: conservative ondemand userspace powersave performance schedutil
  current policy: frequency should be within 1.20 GHz and 3.90 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 1.20 GHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes
    3700 MHz max turbo 4 active cores
    3700 MHz max turbo 3 active cores
    3700 MHz max turbo 2 active cores
    3900 MHz max turbo 1 active cores

バグらしいが、どうやらProxmoxVEのlinux-cpupowerには、
バージョンによりサービス関係のファイルが含まれていない。
https://bugs-devel.debian.org/cgi-bin/bugreport.cgi?bug=894906

なので、rc.localに書いてお茶を濁す。
今回は、ガバナーを「powersave」、最大周波数を「2GHz」としました。

# vi /etc/rc.local

#!/bin/sh
/usr/bin/cpupower frequency-set -g powersave
/usr/bin/cpupower frequency-set -u 2GHz

権限

# chmod 700 /etc/rc.local


念のため再起動させて、ちゃんと適用されているかを確認。

# cpupower monitor
intel-rapl/intel-rapl:0
0
intel-rapl/intel-rapl:0/intel-rapl:0:0
0
    | Nehalem                   || SandyBridge        || Mperf              || RAPL        || Idle_Stats                       
 CPU| C3   | C6   | PC3  | PC6   || C7   | PC2  | PC7   || C0   | Cx   | Freq  || pack | core  || POLL | C1   | C1E  | C3   | C6  
  
   0|  0.02| 96.75|  0.00|  0.00||  0.00|  0.00|  0.00||  0.59| 99.41|  1199||12405196|3732763||  0.00|  0.01|  0.01|  0.07| 99.42
   1|  0.02| 96.75|  0.00|  0.00||  0.00|  0.00|  0.00||  0.25| 99.75|  1199||12405196|3732763||  0.00|  0.00|  0.01|  0.00| 99.73
   2|  0.01| 98.02|  0.00|  0.00||  0.00|  0.00|  0.00||  0.71| 99.29|  1199||12405196|3732763||  0.00|  0.01|  0.00|  0.03| 99.23
   3|  0.01| 98.02|  0.00|  0.00||  0.00|  0.00|  0.00||  0.14| 99.86|  1178||12405196|3732763||  0.00|  0.00|  0.00|  0.00| 99.93
   4|  0.00| 99.14|  0.00|  0.00||  0.00|  0.00|  0.00||  0.17| 99.83|  1204||12405196|3732763||  0.00|  0.00|  0.00|  0.00| 99.89
   5|  0.00| 99.14|  0.00|  0.00||  0.00|  0.00|  0.00||  0.06| 99.94|  1202||12405196|3732763||  0.00|  0.00|  0.00|  0.00| 99.99
   6|  0.05| 95.96|  0.00|  0.00||  0.00|  0.00|  0.00||  0.13| 99.87|  1206||12405196|3732763||  0.00|  0.00|  0.02|  0.02| 99.91
   7|  0.05| 95.96|  0.00|  0.00||  0.00|  0.00|  0.00||  1.98| 98.02|  1200||12405196|3732763||  0.00|  0.01|  0.05|  0.07| 97.99
   8|  0.16| 98.36|  0.00|  0.00||  0.00|  0.00|  0.00||  0.14| 99.86|  1199||12405196|3732763||  0.00|  0.00|  0.00|  0.00| 99.91
   9|  0.16| 98.36|  0.00|  0.00||  0.00|  0.00|  0.00||  0.56| 99.44|  1199||12405196|3732763||  0.01|  0.21|  0.00|  0.20| 99.07
  10|  0.00| 98.90|  0.00|  0.00||  0.00|  0.00|  0.00||  0.21| 99.79|  1200||12405196|3732763||  0.00|  0.00|  0.00|  0.03| 99.83
  11|  0.00| 98.90|  0.00|  0.00||  0.00|  0.00|  0.00||  0.10| 99.90|  1200||12405196|3732763||  0.00|  0.00|  0.00|  0.03| 99.83

コメントを残す

メールアドレスが公開されることはありません。 が付いている欄は必須項目です

Enter code * Time limit is exhausted. Please reload CAPTCHA.

このサイトはスパムを低減するために Akismet を使っています。コメントデータの処理方法の詳細はこちらをご覧ください