pve7.2-7控制cpu频率实现降频降温省电

老黑 教程文档来源:proxmox控制cpu频率实现降频降温省电pve7.2-7控制cpu频率实现降频降温省电已关闭评论32阅读模式

修改启动项

root@pve:~# nano /etc/default/grub

找到quiet那个位置,后面加空格,再加intel_pstate=disable

加上参数后保存,并更新grub

root@pve:~# update-grub

保存完后重启生效。

安装cpufrequtils

[email protected]:~# apt-get install cpufrequtils

配置cpufrequtils,先查看一下信息

[email protected]:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1.60 GHz - 2.30 GHz
  available frequency steps: 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.30 GHz (asserted by call to hardware).
  cpufreq stats: 2.30 GHz:12.35%, 2.20 GHz:0.00%, 2.10 GHz:0.00%, 2.00 GHz:5.16%, 1.90 GHz:0.00%, 1.80 GHz:0.00%, 1.70 GHz:0.00%, 1.60 GHz:82.49%  (4)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 1.60 GHz - 2.30 GHz
  available frequency steps: 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.30 GHz (asserted by call to hardware).
  cpufreq stats: 2.30 GHz:12.35%, 2.20 GHz:0.00%, 2.10 GHz:0.00%, 2.00 GHz:2.45%, 1.90 GHz:0.00%, 1.80 GHz:0.00%, 1.70 GHz:0.00%, 1.60 GHz:85.21%  (4)

可以看到目前是performance模式,主频是2.30 GHz ,下面就配置一下,改成省电模式(powersave) 以最低允许的主频运行

[email protected]:~# vi /etc/init.d/cpufrequtils

找到如下:

ENABLE="true"
GOVERNOR="performance"
MAX_SPEED="2300000"
MIN_SPEED="1600000"

改成:

ENABLE="true"
GOVERNOR="powersave"
MAX_SPEED="1600000"
MIN_SPEED="1600000"

保存后,重启服务:

[email protected]:~# systemctl daemon-reload
[email protected]:~# /etc/init.d/cpufrequtils restart

如果不生效,查看一下是否有/etc/default/cpufrequtils文件,如果有,在这里修改就可以了。

查看状态

[email protected]:~# cpufreq-info
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 10.0 us.
  hardware limits: 1.60 GHz - 2.30 GHz
  available frequency steps: 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz (asserted by call to hardware).
  cpufreq stats: 2.30 GHz:12.35%, 2.20 GHz:0.00%, 2.10 GHz:0.00%, 2.00 GHz:5.16%, 1.90 GHz:0.00%, 1.80 GHz:0.00%, 1.70 GHz:0.00%, 1.60 GHz:82.49%  (4)
analyzing CPU 1:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 10.0 us.
  hardware limits: 1.60 GHz - 2.30 GHz
  available frequency steps: 2.30 GHz, 2.20 GHz, 2.10 GHz, 2.00 GHz, 1.90 GHz, 1.80 GHz, 1.70 GHz, 1.60 GHz
  available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  current policy: frequency should be within 1.60 GHz and 1.60 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency is 1.60 GHz (asserted by call to hardware).
  cpufreq stats: 2.30 GHz:12.35%, 2.20 GHz:0.00%, 2.10 GHz:0.00%, 2.00 GHz:2.45%, 1.90 GHz:0.00%, 1.80 GHz:0.00%, 1.70 GHz:0.00%, 1.60 GHz:85.21%  (4)

看到已经修改生效了。

经过测试,省电模式下,待机会保持在最低功耗,温度也最低。

老黑
Linux使用alias创建自定义命令集 教程文档

Linux使用alias创建自定义命令集

Linux alias命令用于设置指令的别名,用户可利用alias,自定指令的别名。若仅输入alias,则可列出目前所有的别名设置。alias的效力仅及于该次登入的操作。若要每次登入是即自动设好别名,...
使用HiCA免费签发域名通配符SSL证书 IP SSL证书 开撸

使用HiCA免费签发域名通配符SSL证书 IP SSL证书

Hi.CA介绍 HiCA 是一家国产证书品牌,提供免费的通配符ssl证书及ip ssl证书,是全球首家支持通过ACME渠道签发域名、ipv4、ipv6证书的证书品牌。通过域名备案信息了解到其属于上海帝...
知更鸟begin奇怪的问题修复,缩略图空白 教程文档

知更鸟begin奇怪的问题修复,缩略图空白

知更鸟begin主题下,使用沈唁的USS Upyun插件整合又拍云存储发现一个奇怪的问题,文件内部图片的优化选项都成功启用,但是知更鸟begin主题自带的缩略图启用又拍云后前台的文章缩略图全部是白色,...