大约一两个月前,我的 Ubuntu 22.04 系统性能突然受到打击。我没有更改任何硬件,也没有弄乱任何配置。经过一番调查,我发现了这个奇怪的原因。watch grep MHz /proc/cpuinfo
在空闲期间使用时,频率在 800 到 3700 之间跳跃。但是当我使用加载系统时7z b
,频率保持在 800 以下。
我尝试过的:
- 不同的操作系统。我尝试启动 Windows 10 来玩一些游戏,在这里我注意到行为是相同的。我也尝试过启动旧的 Ubuntu 18.04 LTS live,结果还是一样。我也全新安装了 Ubuntu 22.10,结果也是一样。
- 更换 RAM 模块。我尝试了不同的配置,结果还是一样。
- 重新安装 CPU 冷却系统,没有变化。此外,即使在之前,无论如何,温度也保持在合理的 30-40 C。因此,散热似乎不是问题。
turbostat version 2022.04.16 - Len Brown <[email protected]>
CPUID(0): GenuineIntel 0x16 CPUID levels
CPUID(1): family:model:stepping 0x6:5e:3 (6:94:3) microcode 0xf0
CPUID(0x80000000): max_extended_levels: 0x80000008
CPUID(1): SSE3 MONITOR - EIST TM2 TSC MSR ACPI-TM HT TM
CPUID(6): APERF, No-TURBO, DTS, PTM, HWP, HWPnotify, HWPwindow, HWPepp, No-HWPpkg, No-EPB
cpu2: MSR_IA32_MISC_ENABLE: 0x00850089 (TCC EIST MWAIT PREFETCH TURBO)
CPUID(7): SGX
cpu2: MSR_IA32_FEATURE_CONTROL: 0x00000005 (Locked )
CPUID(0x15): eax_crystal: 2 ebx_tsc: 308 ecx_crystal_hz: 0
TSC: 3696 MHz (24000000 Hz * 308 / 2 / 1000000)
CPUID(0x16): base_mhz: 3700 max_mhz: 3700 bus_mhz: 100
cpu2: MSR_MISC_PWR_MGMT: 0x00401cc0 (ENable-EIST_Coordination DISable-EPB DISable-OOB)
RAPL: 5140 sec. Joule Counter Range, at 51 Watts
cpu2: MSR_PLATFORM_INFO: 0x80080838f1012500
8 * 100.0 = 800.0 MHz max efficiency frequency
37 * 100.0 = 3700.0 MHz base frequency
cpu2: MSR_IA32_POWER_CTL: 0x0038005d (C1E auto-promotion: DISabled)
cpu2: MSR_TURBO_RATIO_LIMIT: 0x25252525
37 * 100.0 = 3700.0 MHz max turbo 4 active cores
37 * 100.0 = 3700.0 MHz max turbo 3 active cores
37 * 100.0 = 3700.0 MHz max turbo 2 active cores
37 * 100.0 = 3700.0 MHz max turbo 1 active cores
cpu2: MSR_CONFIG_TDP_NOMINAL: 0x00000025 (base_ratio=37)
cpu2: MSR_CONFIG_TDP_LEVEL_1: 0x00000000 ()
cpu2: MSR_CONFIG_TDP_LEVEL_2: 0x00000000 ()
cpu2: MSR_CONFIG_TDP_CONTROL: 0x80000000 ( lock=1)
cpu2: MSR_TURBO_ACTIVATION_RATIO: 0x00000000 (MAX_NON_TURBO_RATIO=0 lock=0)
cpu2: MSR_PKG_CST_CONFIG_CONTROL: 0x1e008000 (UNdemote-C3, UNdemote-C1, demote-C3, demote-C1, locked, pkg-cstate-limit=0 (pc0))
/dev/cpu_dma_latency: 2000000000 usec (default)
current_driver: intel_idle
current_governor: menu
current_governor_ro: menu
cpu2: POLL: CPUIDLE CORE POLL IDLE
cpu2: C1: MWAIT 0x00
cpu2: C1E: MWAIT 0x01
cpu2: C3: MWAIT 0x10
cpu2: C6: MWAIT 0x20
cpu2: C7s: MWAIT 0x33
cpu2: C8: MWAIT 0x40
cpu2: cpufreq driver: intel_pstate
cpu2: cpufreq governor: powersave
cpufreq intel_pstate no_turbo: 1
cpu2: MSR_MISC_FEATURE_CONTROL: 0x00000000 (L2-Prefetch L2-Prefetch-pair L1-Prefetch L1-IP-Prefetch)
cpu0: MSR_PM_ENABLE: 0x00000001 (HWP)
cpu0: MSR_HWP_CAPABILITIES: 0x010e2525 (high 37 guar 37 eff 14 low 1)
cpu0: MSR_HWP_REQUEST: 0x00002508 (min 8 max 37 des 0 epp 0x0 window 0x0 pkg 0x0)
cpu0: MSR_HWP_INTERRUPT: 0x00000001 (EN_Guaranteed_Perf_Change, Dis_Excursion_Min)
cpu0: MSR_HWP_STATUS: 0x00000000 (No-Guaranteed_Perf_Change, No-Excursion_Min)
cpu0: MSR_RAPL_POWER_UNIT: 0x000a0e03 (0.125000 Watts, 0.000061 Joules, 0.000977 sec.)
cpu0: MSR_PKG_POWER_INFO: 0x00000198 (51 W TDP, RAPL 0 - 0 W, 0.000000 sec.)
cpu0: MSR_PKG_POWER_LIMIT: 0x42ffff001dffff (UNlocked)
cpu0: PKG Limit #1: ENabled (4095.875 Watts, 16.000000 sec, clamp ENabled)
cpu0: PKG Limit #2: ENabled (4095.875 Watts, 0.002441* sec, clamp DISabled)
cpu0: MSR_VR_CURRENT_CONFIG: 0x80000000
cpu0: PKG Limit #4: 0.000000 Watts (locked)
cpu0: MSR_DRAM_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: DRAM Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP0_POLICY: 0
cpu0: MSR_PP0_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: Cores Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_PP1_POLICY: 0
cpu0: MSR_PP1_POWER_LIMIT: 0x00000000 (UNlocked)
cpu0: GFX Limit: DISabled (0.000 Watts, 0.000977 sec, clamp DISabled)
cpu0: MSR_IA32_TEMPERATURE_TARGET: 0x00641400 (100 C) (100 default - 0 offset)
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x8846000c (30 C)
cpu0: MSR_IA32_PACKAGE_THERM_INTERRUPT: 0x00000003 (100 C, 100 C)
cpu2: MSR_PKGC3_IRTL: 0x0000884e (valid, 79872 ns)
cpu2: MSR_PKGC6_IRTL: 0x00008876 (valid, 120832 ns)
cpu2: MSR_PKGC7_IRTL: 0x00008894 (valid, 151552 ns)
cpu2: MSR_PKGC8_IRTL: 0x000088fa (valid, 256000 ns)
cpu2: MSR_PKGC9_IRTL: 0x0000894c (valid, 339968 ns)
cpu2: MSR_PKGC10_IRTL: 0x00008bf2 (valid, 1034240 ns)
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 - 3.70 GHz
available cpufreq governors: performance powersave
current policy: frequency should be within 800 MHz and 3.70 GHz.
The governor "powersave" may decide which speed to use
within this range.
current CPU frequency: Unable to call hardware
current CPU frequency: 800 MHz (asserted by call to kernel)
boost state support:
Supported: no
Active: no
Busy% Bzy_MHz IRQ PkgTmp PkgWatt GFXWatt
3.57 800 6246 29 12.10 0.00
2.48 800 4717 30 12.07 0.00
73.91 800 18038 30 13.56 0.00
99.77 800 17158 30 13.78 0.00
90.46 800 16900 31 13.75 0.00
97.21 800 16835 30 13.79 0.00
99.77 800 16862 31 13.80 0.00
80.01 800 17050 31 13.76 0.00
99.77 800 16750 30 13.80 0.00
85.76 800 15274 31 13.70 0.00
78.03 800 17381 31 13.70 0.00
93.27 800 17339 32 13.81 0.00
99.77 800 16879 31 13.80 0.00
8.20 800 4337 31 12.18 0.00
0.87 800 3126 31 12.04 0.00
1.01 800 3250 30 12.04 0.00
0.79 800 2909 30 12.03 0.00
0.61 800 2473 30 12.02 0.00
答案1
turobstat 列出的此 MSR:
cpu0: MSR_IA32_PACKAGE_THERM_STATUS: 0x8846000c (30 C)
并通过位 2 和 3 表示外部 PROCHOT 位已设置。这将强制您的 CPU 降速。以下内容是从英特尔 SDM 复制并粘贴的
• Package PROCHOT# Event (bit 2, RO) — Indicates whether package PROCHOT# is being asserted by
another agent on the platform.
• Package PROCHOT# Log (bit 3, R/WC0) — Sticky bit that indicates whether package PROCHOT# has been
asserted by another agent on the platform since the last clearing of this bit or a reset. If bit 3 = 1, package
PROCHOT# has been externally asserted. Software may clear this bit by writing a zero.
您需要确定设置该外部位的原因。例如,当充电器故障或非戴尔产品时,戴尔笔记本电脑会设置该位(至少我认为是该位)。
回答第 2 部分:
有时您会观察到 800 MHz 和有时 3700 MHz 的原因watch grep MHz /proc/cpuinfo
是,它显示默认的基本 CPU 频率,在本例中为 3.7 GHz,而由于该 CPU 长时间处于深度空闲状态,实际信息已经过时。