设置2o独服CPU为性能模式

介绍

performance         运行于最大频率
powersave         运行于最小频率
userspace         运行于用户指定的频率
ondemand         按需快速动态调整CPU频率, 一有cpu计算量的任务,就会立即达到最大频率运行,空闲时间增加就降低频率
conservative         按需快速动态调整CPU频率, 比 ondemand 的调整更保守
schedutil         基于调度程序调整 CPU 频率机子默认一般运行于ondemand模式,会有中断开销,睿频也是有开销的,特别是对于低端cpu。调整到performance模式,就是一直以最大频率运行。

效果

之前

cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to cpufreq@vger.kernel.org, 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.40 GHz – 2.10 GHz
available frequency steps: 2.10 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 1.40 GHz and 2.10 GHz.
The governor “ondemand” may decide which speed to use
within this range.
current CPU frequency is 1.40 GHz (asserted by call to hardware).
cpufreq stats: 2.10 GHz:100.00%, 1.80 GHz:0.00%, 1.60 GHz:0.00%, 1.40 GHz:0.00% (65)

之后

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.40 GHz – 2.10 GHz
available frequency steps: 2.10 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz
available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
current policy: frequency should be within 1.40 GHz and 2.10 GHz.
The governor “performance” may decide which speed to use
within this range.
current CPU frequency is 2.10 GHz (asserted by call to hardware).
cpufreq stats: 2.10 GHz:99.99%, 1.80 GHz:0.00%, 1.60 GHz:0.00%, 1.40 GHz:0.01% (461)

设置

Centos7

yum install -y cpupowerutils;
cpupower frequency-info
cat /proc/cpuinfo

cpupower frequency-set -g performance

Debian

apt install cpufrequtils
编辑 /etc/default/cpufrequtils 如不存在则创建
添加 GOVERNOR="performance"
systemctl restart cpufrequtils
cpufreq-info 
© 版权声明
THE END
喜欢就支持以下吧
点赞0
分享
评论 共1条
    • hunter
    • Charmain0

      This piece of writing is in fact a pleasant one it
      helps new the web people, who are wishing in favor of blogging.



      Feel free to visit my web-site informative post

      5天前回复