全球主机交流论坛

标题: 3O设置CPU为性能模式(C2338设置主频2100MHz) [打印本页]

作者: 恋花    时间: 2019-11-14 22:04
标题: 3O设置CPU为性能模式(C2338设置主频2100MHz)
以下是Centos7 的代码,其他系统自行搜索测试

  1. # yum install -y cpupowerutils;
  2. # cpupower frequency-info
  3. # cat /proc/cpuinfo

  4. cpupower frequency-set -g performance
复制代码


效果

作者: 6700    时间: 2019-11-14 22:05
没什么意义吧 自动睿频
作者: jeff    时间: 2019-11-14 22:06
怎么也比单核vps强吧
作者: Exabyte    时间: 2019-11-14 23:37
收藏了,希望不会让CPU着火哈~
作者: _____________Cc    时间: 2019-11-15 00:11
Debian怎么搞
作者: yanaxiao    时间: 2019-11-15 01:06
求debian的方法。
作者: h2o    时间: 2019-11-15 01:48
提示: 作者被禁止或删除 内容自动屏蔽
作者: register    时间: 2019-11-15 08:15
本帖最后由 register 于 2019-11-15 08:16 编辑

楼上一些人不了解呀

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 ' "


作者: biubiu    时间: 2019-11-15 08:17
jeff 发表于 2019-11-14 22:06
怎么也比单核vps强吧

现实是反过来

单核VPS怎么也比这个U强

当然长期满负载,应该还是C2338强,毕竟是杜甫
作者: mzh    时间: 2019-11-15 08:29
Debian
  1. apt install cpufrequtils
复制代码
  1. 编辑 /etc/default/cpufrequtils 如不存在则创建,
复制代码
  1. 添加 GOVERNOR="performance"
复制代码
  1. systemctl restart cpufrequtils
复制代码



之前:
  1. cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
  2. Report errors and bugs to [email protected], please.
  3. analyzing CPU 0:
  4.   driver: acpi-cpufreq
  5.   CPUs which run at the same hardware frequency: 0
  6.   CPUs which need to have their frequency coordinated by software: 0
  7.   maximum transition latency: 10.0 us.
  8.   hardware limits: 1.40 GHz - 2.10 GHz
  9.   available frequency steps: 2.10 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz
  10.   available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  11.   current policy: frequency should be within 1.40 GHz and 2.10 GHz.
  12.                   The governor "ondemand" may decide which speed to use
  13.                   within this range.
  14.   current CPU frequency is 1.40 GHz (asserted by call to hardware).
  15.   cpufreq stats: 2.10 GHz:100.00%, 1.80 GHz:0.00%, 1.60 GHz:0.00%, 1.40 GHz:0.00%  (65)
复制代码


之后
  1. analyzing CPU 0:
  2.   driver: acpi-cpufreq
  3.   CPUs which run at the same hardware frequency: 0
  4.   CPUs which need to have their frequency coordinated by software: 0
  5.   maximum transition latency: 10.0 us.
  6.   hardware limits: 1.40 GHz - 2.10 GHz
  7.   available frequency steps: 2.10 GHz, 1.80 GHz, 1.60 GHz, 1.40 GHz
  8.   available cpufreq governors: conservative, ondemand, userspace, powersave, performance, schedutil
  9.   current policy: frequency should be within 1.40 GHz and 2.10 GHz.
  10.                   The governor "performance" may decide which speed to use
  11.                   within this range.
  12.   current CPU frequency is 2.10 GHz (asserted by call to hardware).
  13.   cpufreq stats: 2.10 GHz:99.99%, 1.80 GHz:0.00%, 1.60 GHz:0.00%, 1.40 GHz:0.01%  (461)
复制代码

作者: esky    时间: 2019-11-15 09:09
提示: 作者被禁止或删除 内容自动屏蔽
作者: guyuefeng    时间: 2019-11-15 09:13
战略性mark,这个机器美滋滋
作者: 快乐风男    时间: 2019-11-15 09:18
开了,等烧掉的那一天
作者: tamicrealo    时间: 2019-11-15 10:23
esky 发表于 2019-11-15 09:09
不知道为什么弄完后最高只有1750

我的也是 1750, 不知道哪里设置不对
作者: 寒夜方舟    时间: 2019-11-15 18:35

我这也是显示的1750
作者: myseil    时间: 2019-11-15 18:41
2100成功...
作者: 6700    时间: 2019-11-15 18:44
寒夜方舟 发表于 2019-11-15 18:35
我这也是显示的1750


看错了吧 cpu MHz才是
lscpu | grep 'CPU MHz'
作者: 28661    时间: 2019-11-15 18:45
debian只有1750
model name      : Intel(R) Atom(TM) CPU  C2338  @ 1.74GHz
stepping        : 8
microcode       : 0x125
cpu MHz         : 1750.001

作者: 寒夜方舟    时间: 2019-11-15 18:48
6700 发表于 2019-11-15 18:44
看错了吧 cpu MHz才是
lscpu | grep 'CPU MHz'

我是centos,启用后最高也只有1750

作者: 寒夜方舟    时间: 2019-11-15 18:51
难道还有cpu体质的区别?
或者是我用的 秋水的一键脚本更新了内核和启用了bbr导致cpu支持不好?

作者: 寒夜方舟    时间: 2019-11-15 19:13
cpu强制烤鸡下cpu也到不了2100


作者: esky    时间: 2019-11-15 19:43
提示: 作者被禁止或删除 内容自动屏蔽
作者: 掩耳盗铃    时间: 2019-11-15 19:47
寒夜方舟 发表于 2019-11-15 19:13
cpu强制烤鸡下cpu也到不了2100

+1
作者: yfn    时间: 2019-11-15 19:48
这个不怕被ol ban 机吗....
作者: 寒夜方舟    时间: 2019-11-15 19:50
esky 发表于 2019-11-15 19:43
我也是开了bbr

看来就是更新内核使得cpu的某个驱动挂了
作者: 寒夜方舟    时间: 2019-11-15 19:51
yfn 发表于 2019-11-15 19:48
这个不怕被ol ban 机吗....

独服随便整呀 只要不影响别人 被发邮件再问客服
作者: 木易酱    时间: 2019-11-16 11:54
centos只能到1700,debian可以到2100
作者: 寒夜方舟    时间: 2019-11-17 22:18
通过对比试验确定,centos7如果使用一键脚本更换内核并更新后,它的最高频率只能是1750,可能是内核兼容性问题
作者: 木子喵    时间: 2019-11-17 22:22
mark ~~~
作者: weiai    时间: 2019-11-17 22:39
这种模式调整只适用于debian,上次在Let论坛看到的,部分系统,并不生效
作者: geo    时间: 2019-11-17 22:45
感谢
作者: Luna    时间: 2019-11-17 23:25
提示: 作者被禁止或删除 内容自动屏蔽
作者: Xhvai110    时间: 2019-11-17 23:39
Mark
作者: 掩耳盗铃    时间: 2019-11-18 13:46
效果还是很明显的。谢谢啦
作者: 凤梨    时间: 2019-11-18 13:59
不错不错,已经成功


作者: Xhvai110    时间: 2019-11-19 12:34
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





欢迎光临 全球主机交流论坛 (https://loc.isir333.eu.org/) Powered by Discuz! X3.4