全球主机交流论坛

 找回密码
 注册

QQ登录

只需一步,快速开始

CeraNetworks网络延迟测速工具IP归属甄别会员请立即修改密码
查看: 7696|回复: 39
打印 上一主题 下一主题

[疑问] 3O设置CPU为性能模式(C2338设置主频2100MHz)

  [复制链接]
跳转到指定楼层
1#
发表于 2019-11-14 22:04:49 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
以下是Centos7 的代码,其他系统自行搜索测试

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

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


效果
推荐
发表于 2019-11-15 08:29:18 | 只看该作者
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)
复制代码

点评

Debian10测试成功,显示和层主一样,2.1 Ghz,原版BBR。  发表于 2019-11-17 22:56
cpufreq-info可以查看层主的之前之后,谢谢层主  发表于 2019-11-17 22:53
推荐
发表于 2019-11-15 08:15:10 | 只看该作者
本帖最后由 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 ' "

推荐
发表于 2019-11-14 22:05:18 | 只看该作者
没什么意义吧 自动睿频

点评

以前我在24核机器试过,有用,这个没测试,不知道效果明显不明显.  发表于 2019-11-14 22:09
3#
发表于 2019-11-14 22:06:29 来自手机 | 只看该作者
怎么也比单核vps强吧
4#
发表于 2019-11-14 23:37:09 | 只看该作者
收藏了,希望不会让CPU着火哈~
5#
发表于 2019-11-15 00:11:13 来自手机 | 只看该作者
Debian怎么搞
6#
发表于 2019-11-15 01:06:39 | 只看该作者
求debian的方法。
7#
发表于 2019-11-15 01:48:21 | 只看该作者
提示: 作者被禁止或删除 内容自动屏蔽
9#
发表于 2019-11-15 08:17:48 | 只看该作者
jeff 发表于 2019-11-14 22:06
怎么也比单核vps强吧

现实是反过来

单核VPS怎么也比这个U强

当然长期满负载,应该还是C2338强,毕竟是杜甫
您需要登录后才可以回帖 登录 | 注册

本版积分规则

Archiver|手机版|小黑屋|全球主机交流论坛

GMT+8, 2026-1-12 05:12 , Processed in 0.531740 second(s), 16 queries , Gzip On, MemCache On.

Powered by Discuz! X3.4

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表