linux – cpufreq-info与/ proc / cpuinfo不同?

前端之家收集整理的这篇文章主要介绍了linux – cpufreq-info与/ proc / cpuinfo不同?前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。
我有一台服务器,我想确保它始终以最高速度运行,从不在节能模式下运行.我尝试了一些策略(除了重新启动和更改B IOS中的设置,我必须为几百台服务器做这些)但我从cpufreq-info得到了奇怪的结果.例如.:
root@host:~# cpufreq-info -c 0
cpufrequtils 007: 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.20 GHz - 2.20 GHz
  available frequency steps: 2.20 GHz,2.20 GHz,2.10 GHz,2.00 GHz,1.90 GHz,1.80 GHz,1.70 GHz,1.60 GHz,1.50 GHz,1.40 GHz,1.30 GHz,1.20 GHz
  available cpufreq governors: conservative,ondemand,userspace,powersave,performance
  current policy: frequency should be within 2.00 GHz and 2.20 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current cpu frequency is 1.20 GHz (asserted by call to hardware).
  cpufreq stats: 2.20 GHz:6.50%,2.20 GHz:0.24%,2.10 GHz:0.34%,2.00 GHz:0.05%,1.90 GHz:0.04%,1.80 GHz:0.03%,1.70 GHz:0.03%,1.60 GHz:0.03%,1.50 GHz:0.03%,1.40 GHz:0.03%,1.30 GHz:0.03%,1.20 GHz:92.66%  (8080636)

请注意,最小速度显示“2.00 GHz”,调速器设置为“性能”,但当前cpu频率为1.20 GHz.但是,如果我只查看/ proc / cpuinfo,那么它的值始终为~2.2 GHz:

root@host:~# egrep 'MHz|Xeon' /proc/cpuinfo ; cpufreq-info -c 0
model name  : Intel(R) Xeon(R) cpu E5-2660 0 @ 2.20GHz
cpu MHz     : 2200.000
model name  : Intel(R) Xeon(R) cpu E5-2660 0 @ 2.20GHz
cpu MHz     : 2201.000

哪一个是正确的?我相信哪一个?除了BIOS更改之外,有什么方法可以保证最高性能模式吗?对于它的价值,这是Ubuntu 12.04,带有这个内核:

Linux host 3.2.0-76-generic #111-Ubuntu SMP Tue Jan 13 22:16:09 UTC 2015 x86_64 x86_64 x86_64 GNU/Linux

解决方法

我几乎确信你的BIOS将你的cpu限制在1.20 GHz.在内核中有两个值:

> scaling_cur_freq,这是cpufreq驱动程序认为它已请求的频率. / proc / cpuinfo包含此值.它调用cpufreq_quick_get()函数.
> cpuinfo_cur_freq,它是实际编程到cpu中的频率. cpufreq-info使用此值,如“通过调用硬件断言”所示. (它最终调用__cpufreq_get().)如果cpuinfo_cur_freq不可用,它将回退到scaling_cur_freq.

1关于Matt对大规模BIOS更新的评论.例如,HP Proliant DL类服务器允许您在线更改电源调节.也许您的硬件具有类似的功能.

原文链接:https://www.f2er.com/linux/398980.html

猜你在找的Linux相关文章