RHEL7.9设置CPU性能模式

博主在RHEL7.9系统中使用Vitals监控到CPU一直运行在3.47GHz,通过`cpupower`命令查看CPU信息并设置性能模式。原先CPU频率固定在3.47GHz,后设置为`ondemand`模式,当前频率调整为1.73GHz,实现了性能模式的切换并立即生效。
摘要由CSDN通过智能技术生成

RHEL7.9设置CPU性能模式

在https://extensions.gnome.org/#上安装了Vitals这个可以实时监控处理器、内存、磁盘、网络、风扇、温度的这么一个插件。然后问题来了:
我的机子是华南金牌主板X58系列,处理器是至强X5690,监控显示处理器一直工作在3.47GHz,我还以为是Linux系统不完善造成的,后来一想,我装的红帽服务器的操作系统啊,于是查了下命令,看看能不能看到CPU运行参数什么的,强迫症不能忍。
命令为cpupower,在root用户下使用,或者普通用户加sudo。

Usage:	cpupower [-d|--debug] [-c|--cpu cpulist ] <command> [<args>]
Supported commands are:
	frequency-info
	frequency-set
	idle-info
	idle-set
	set
	info
	monitor
	help

我这台式机CPU信息如下:

[root@master rhel]# cpupower frequency-info
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 - 3.47 GHz
  available frequency steps:  3.47 GHz, 3.47 GHz, 3.33 GHz, 3.20 GHz, 3.07 GHz, 2.93 GHz, 2.80 GHz, 2.67 GHz, 2.53 GHz, 2.40 GHz, 2.27 GHz, 2.13 GHz, 2.00 GHz, 1.87 GHz, 1.73 GHz, 1.60 GHz
  available cpufreq governors: conservative userspace powersave ondemand performance
  current policy: frequency should be within 1.60 GHz and 3.47 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: 3.47 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    2700 MHz max turbo 4 active cores
    2700 MHz max turbo 3 active cores
    2800 MHz max turbo 2 active cores
    2800 MHz max turbo 1 active cores

重新设置CPU性能模式,这个是可以立即生效的。

[root@master rhel]# cpupower frequency-set -g ondemand
Setting cpu: 0
Setting cpu: 1
Setting cpu: 2
Setting cpu: 3
Setting cpu: 4
Setting cpu: 5
Setting cpu: 6
Setting cpu: 7
Setting cpu: 8
Setting cpu: 9
Setting cpu: 10
Setting cpu: 11

再次查看有如下信息:

current policy: frequency should be within 1.60 GHz and 3.47 GHz.
                  The governor "ondemand" may decide which speed to use
                  within this range.
  current CPU frequency: 1.73 GHz (asserted by call to hardware)

OK,搞定。

  • 0
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值