如何在 CentOS 6 中禁用 CPU 频率调节?

如何在 CentOS 6 中禁用 CPU 频率调节?

我有两台完全相同的裸机服务器,具有相同的操作系统/内核配置,但它们以两种不同的 CPU 频率运行:一个是固定的一个在2300MHz,另一个在1200MHz到2300MHz之间变化。中的信息sudo cpupower frequency-info如下:

第一个服务器:

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1.20 GHz - 2.50 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1.20 GHz and 2.50 GHz.
                  The governor "powersave" may decide which speed to use within this range.
  current CPU frequency: 2.30 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes

第二台服务器:

analyzing CPU 0:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency:  Cannot determine or is not supported.
  hardware limits: 1.20 GHz - 2.50 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 2.00 GHz and 2.50 GHz.
                  The governor "performance" may decide which speed to use within this range.
  current CPU frequency: 1.20 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes

cat /proc/cpuinfo除了这一行之外,完全相同cpu MHz

processor   : 31
vendor_id   : GenuineIntel
cpu family  : 6
model       : 62
model name  : Intel(R) Xeon(R) CPU E5-2640 v2 @ 2.00GHz
stepping    : 4
microcode   : 0x428
cpu MHz     : 2299.921
cache size  : 20480 KB
physical id : 1
siblings    : 16
core id     : 7
cpu cores   : 8
apicid      : 47
initial apicid  : 47
fpu     : yes
fpu_exception   : yes
cpuid level : 13
wp      : yes
flags       : fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc aperfmperf eagerfpu pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm ida arat xsaveopt pln pts dtherm tpr_shadow vnmi flexpriority ept vpid fsgsbase smep erms
bogomips    : 4004.73
clflush size    : 64
cache_alignment : 64
address sizes   : 46 bits physical, 48 bits virtual
power management:

我尝试了很多文章介绍的方法,例如sudo service cpuspeed stop,,,等等,但没有任何效果。看起来CPU频率缩放根本不受控制:运行在sudo cpupower frequency-set -g performancesudo cpupower frequency-set -d 2000000最大提升频率当驾驶员/调速器说 时powersave,另一个从 1200MHz 跳起,同时驾驶员/调速器说performance(这应该将频率限制在 2000MHz 和 2500MHz 之间)。

顺便说一句,两台服务器都没有温度限制。

我的操作系统是CentOS release 6.6 (Final),内核是3.10.73,我怎样才能控制CPU频率缩放?

答案1

硬件差异可能是由 BIOS 设置造成的;检查每个系统上的 BIOS 是否存在差异。这可能需要停机,因此最好在生产启动之前完成,例如作为设置任务的一部分。一些供应商提供实际在 UNIX 上运行的软件工具来访问 BIOS,如果可用,这可能更适合自动正确配置 BIOS(有关详细信息,请参阅供应商网站)。配置 BIOS 的另一个选项可能是通过 PXE 引导系统并运行包含 BIOS 配置软件的映像。

相关内容