以下是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
复制代码
之前:
- 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.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)
复制代码
青海网友:
楼上一些人不了解呀
performance 运行于最大频率
powersave 运行于最小频率
userspace 运行于用户指定的频率
ondemand 按需快速动态调整CPU频率, 一有cpu计算量的任务,就会立即达到最大频率运行,空闲时间增加就降低频率
conservative 按需快速动态调整CPU频率, 比 ondemand 的调整更保守
schedutil 基于调度程序调整 CPU 频率
机子默认一般运行于ondemand模式,会有中断开销,睿频也是有开销的,特别是对于低端cpu。
调整到performance模式,就是一直以最大频率运行。
其实无需安装软件包,直接创建一个udev规则
/etc/udev/rules.d/50-scaling-governor.rules
SUBSYSTEM=="module", ACTION=="add", KERNEL=="acpi_cpufreq", RUN+=" /bin/sh -c ‘ \
echo performance > /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor ‘ "
河北网友:没什么意义吧 自动睿频
陕西网友:怎么也比单核vps强吧
香港网友:收藏了,希望不会让CPU着火哈~
江西网友:Debian怎么搞
上海网友:求debian的方法。
西藏网友:
正解 自动睿频 没用
海南网友:现实是反过来
单核VPS怎么也比这个U强
当然长期满负载,应该还是C2338强,毕竟是杜甫
广东网友:现实是反过来
单核VPS怎么也比这个U强
当然长期满负载,应该还是C2338强,毕竟是杜甫
贵州网友:战略性mark,这个机器美滋滋
云南网友:开了,等烧掉的那一天
上海网友:我的也是 1750, 不知道哪里设置不对
宁夏网友:
我这也是显示的1750
山东网友:2100成功…
湖南网友:
看错了吧 cpu MHz才是
lscpu | grep ‘CPU MHz’
江苏网友:debian只有1750
model name : Intel(R) Atom(TM) CPU C2338 @ 1.74GHz
stepping : 8
microcode : 0x125
cpu MHz : 1750.001
海南网友:我是centos,启用后最高也只有1750
澳门网友:难道还有cpu体质的区别?
或者是我用的 秋水的一键脚本更新了内核和启用了bbr导致cpu支持不好?
内蒙古网友:难道还有cpu体质的区别?
或者是我用的 秋水的一键脚本更新了内核和启用了bbr导致cpu支持不好?
海南网友:我也是开了bbr
重庆网友:+1
云南网友:这个不怕被ol ban 机吗….
吉林网友:看来就是更新内核使得cpu的某个驱动挂了
黑龙江网友:独服随便整呀 只要不影响别人 被发邮件再问客服
四川网友:centos只能到1700,debian可以到2100
广西网友:通过对比试验确定,centos7如果使用一键脚本更换内核并更新后,它的最高频率只能是1750,可能是内核兼容性问题
江苏网友:mark ~~~
陕西网友:这种模式调整只适用于debian,上次在Let论坛看到的,部分系统,并不生效
山东网友:这种模式调整只适用于debian,上次在Let论坛看到的,部分系统,并不生效
青海网友:其实是BIOS限制…如果BIOS不限制,I家的CPU睿频还用调吗?至于有没有睿频,可以用i7z看
辽宁网友:Mark
浙江网友:效果还是很明显的。谢谢啦
西藏网友:不错不错,已经成功
内蒙古网友: no or unknown cpufreq driver is active on this CPU
CPUs which run at the same hardware frequency: Not Available
CPUs which need to have their frequency coordinated by software: Not Available
maximum transition latency: Cannot determine or is not supported.
hardware limits: Not Available
available cpufreq governors: Not Available
Unable to determine current policy
current CPU frequency: Unable to call hardware
current CPU frequency: Unable to call to kernel
boost state support:
Supported: yes
Active: yes