为什么我的 i5-4250U (Haswell) CPU 被限制到 800MHz?

为什么我的 i5-4250U (Haswell) CPU 被限制到 800MHz?

几个月以来,我的 Intel NUC D54250WYK 的 CPU 似乎受到限制,性能很差。

令人惊讶的是,报告的频率因工具而异,要么报告为 230MHz(/proc/cpuinfo、cpupower),要么报告为 800MHz(i7z)。无论如何,即使在高负载(cpu 绑定)下,这个频率也不会更高。

中央处理器应该能够以 1.3GHZ 甚至 2.6GHz(涡轮模式)运行。

我已经尝试过

  • 检查体温:正常(~38°C)
  • 环境表现州长cpupower
  • 将最低频率提高到 100%:echo 100 > /sys/devices/system/cpu/intel_pstate/min_perf_pct
  • 提高 powercap 长期和短期功率 ( powercap-set --zone 0 -p intel-rapl -l 45000000 -c1 powercap-set --zone 0 -p intel-rapl -l 45000000 -c0)

现在我缺乏想法

日志/诊断

dmesg|grep -i cpu

[    0.092953] smpboot: Allowing 4 CPUs, 0 hotplug CPUs
[    0.195828] setup_percpu: NR_CPUS:512 nr_cpumask_bits:512 nr_cpu_ids:4 nr_node_ids:1
[    0.196014] percpu: Embedded 45 pages/cpu s144408 r8192 d31720 u524288
[    0.196020] pcpu-alloc: s144408 r8192 d31720 u524288 alloc=1*2097152
[    0.196021] pcpu-alloc: [0] 0 1 2 3 
[    0.231191] SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=4, Nodes=1
[    0.251929] rcu:     RCU restricting CPUs from NR_CPUS=512 to nr_cpu_ids=4.
[    0.251930] rcu: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=4
[    0.280880] CPU0: Thermal monitoring enabled (TM1)
[    0.280925] MDS: Vulnerable: Clear CPU buffers attempted, no microcode
[    0.394460] smpboot: CPU0: Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz (family: 0x6, model: 0x45, stepping: 0x1)
[    0.395003] random: crng done (trusting CPU's manufacturer)
[    0.395342] smp: Bringing up secondary CPUs ...
[    0.395403] .... node  #0, CPUs:      #1 #2
[    0.395738] MDS CPU bug present and SMT on, data leak possible. See https://www.kernel.org/doc/html/latest/admin-guide/hw-vuln/mds.html for more details.
[    0.395738] smp: Brought up 1 node, 4 CPUs
[    0.398387] cpuidle: using governor ladder
[    0.398387] cpuidle: using governor menu
[    0.414357] ACPI: SSDT 0xFFFF9EDF91566800 0003D3 (v01 PmRef  Cpu0Cst  00003001 INTL 20120711)
[    2.204892] ledtrig-cpu: registered to indicate activity on CPUs
[    2.692528] cryptd: max_cpu_qlen set to 1000

i7z 报告的内容:

Cpu speed from cpuinfo 1895.00Mhz
cpuinfo might be wrong if cpufreq is enabled. To guess correctly try estimating via tsc
Linux's inbuilt cpu_khz code emulated now
True Frequency (without accounting Turbo) 1895 MHz
  CPU Multiplier 19x || Bus clock frequency (BCLK) 99.74 MHz

Socket [0] - [physical cores=2, logical cores=4, max online cores ever=2]
  TURBO ENABLED on 2 Cores, Hyper Threading ON
  Max Frequency without considering Turbo 1994.74 MHz (99.74 x [20])
  Max TURBO Multiplier (if Enabled) with 1/2/3/4 Cores is  26x/23x/23x/23x
  Real Current Frequency 797.99 MHz [99.74 x 8.00] (Max of below)
        Core [core-id]  :Actual Freq (Mult.)      C0%   Halt(C1)%  C3 %   C6 %  Temp      VCore
        Core 1 [0]:       797.99 (8.00x)        26.7    87.8       1       0    38      0.6844
        Core 2 [1]:       797.88 (8.00x)        23.9    89.9       0       0    38      0.6877

/proc/puinfo:

processor   : 0
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
stepping    : 1
microcode   : 0x16
cpu MHz     : 231.130
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 0
initial apicid  : 0
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 cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 3791.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 1
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
stepping    : 1
microcode   : 0x16
cpu MHz     : 231.609
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 2
initial apicid  : 2
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 cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 3791.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 2
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
stepping    : 1
microcode   : 0x16
cpu MHz     : 213.175
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 0
cpu cores   : 2
apicid      : 1
initial apicid  : 1
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 cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 3791.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

processor   : 3
vendor_id   : GenuineIntel
cpu family  : 6
model       : 69
model name  : Intel(R) Core(TM) i5-4250U CPU @ 1.30GHz
stepping    : 1
microcode   : 0x16
cpu MHz     : 213.789
cache size  : 3072 KB
physical id : 0
siblings    : 4
core id     : 1
cpu cores   : 2
apicid      : 3
initial apicid  : 3
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 cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm abm cpuid_fault epb invpcid_single pti tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 avx2 smep bmi2 erms invpcid xsaveopt dtherm ida arat pln pts
bugs        : cpu_meltdown spectre_v1 spectre_v2 spec_store_bypass l1tf mds swapgs itlb_multihit srbds
bogomips    : 3791.00
clflush size    : 64
cache_alignment : 64
address sizes   : 39 bits physical, 48 bits virtual
power management:

cpupower 频率信息

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: 800 MHz - 2.60 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 800 MHz and 2.60 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 231 MHz (asserted by call to kernel)
  boost state support:
    Supported: yes
    Active: yes

powercap-info -p 英特尔-rapl

Zone 0
  name: package-0
  enabled: 1
  max_energy_range_uj: 262143328850
  energy_uj: 181530049075
  Constraint 0
    name: long_term
    power_limit_uw: 45000000
    time_window_us: 27983872
    max_power_uw: 15000000
  Constraint 1
    name: short_term
    power_limit_uw: 45000000
    time_window_us: 2440
    max_power_uw: 0
  Zone 0:0
    name: core
    enabled: 0
    max_energy_range_uj: 262143328850
    energy_uj: 83782449334
    Constraint 0
      name: long_term
      power_limit_uw: 0
      time_window_us: 976
  Zone 0:1
    name: uncore
    enabled: 0
    max_energy_range_uj: 262143328850
    energy_uj: 159499103
    Constraint 0
      name: long_term
      power_limit_uw: 0
      time_window_us: 976
  Zone 0:2
    name: dram
    enabled: 0
    max_energy_range_uj: 262143328850
    energy_uj: 101819952780
    Constraint 0
      name: long_term
      power_limit_uw: 0
      time_window_us: 976

答案1

碰巧安装英特尔微码重新启动即可。

(微码从版本 0x16 升级到版本 0x26)。

  • CPU 恢复正常频率调节,需要时最高可达 2.6GHZ
  • 不同工具报告的频率不再有差异

相关内容