![性能调节器未设置最大频率](https://linux22.com/image/788865/%E6%80%A7%E8%83%BD%E8%B0%83%E8%8A%82%E5%99%A8%E6%9C%AA%E8%AE%BE%E7%BD%AE%E6%9C%80%E5%A4%A7%E9%A2%91%E7%8E%87.png)
我尝试在性能模式下使用调节器,但每次检查频率值时,我都会看到频率低于 CPU 频率。我使用的是 Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
$ grep -E '^model name|^cpu MHz' /proc/cpuinfo
...
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 2502.455
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 2510.818
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 2510.623
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 1200.373
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 1200.297
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 1201.526
model name : Intel(R) Xeon(R) CPU E5-2650 v4 @ 2.20GHz
cpu MHz : 1200.133
...
首先,我在 中将调节器设置为性能模式/etc/default/cpufrequtils
。此外,我还删除了按需服务。此外,我已将energy_perf_bias
所有核心设置为 0
for cpu in /sys/devices/system/cpu/cpu{0..47}; do
echo 0 > "$cpu/power/energy_perf_bias"
done
我已经将min_perf_pct
intel_pstate 驱动程序设置为 100
echo 100 > /sys/devices/system/cpu/intel_pstate/min_perf_pct
我也从内核配置中设置了CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
我使用以下 grub 选项来启动内核
intel_pstate=no_hwp intel_idle.max_cstate=0 processor.max_cstate=1 idle=halt
但内核仍然没有以相同的最大频率运行。
我怀疑这里的问题是,由于其极限在 1.2Ghz 和 2.9Ghz 之间,因此调速器试图超过 2.20GHz 的基本频率。因此,调速器可能会降低某些核心的频率以使其处于 TDP(热设计功率)范围内。
因此,为了避免这种情况,我禁用了涡轮频率
echo -n 1 > /sys/devices/system/cpu/intel_pstate/no_turbo
并将最小扩展频率设置为 2.2GHz,/sys/devices/system/cpu/cpu*/cpufreq/scaling_min_freq
但仍然有内核没有以 2.2Ghz 运行
$ cpufreq-info
...
analyzing CPU 12:
driver: intel_pstate
CPUs which run at the same hardware frequency: 12
CPUs which need to have their frequency coordinated by software: 12
maximum transition latency: 4294.55 ms.
hardware limits: 1.20 GHz - 2.90 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 2.20 GHz and 2.20 GHz.
The governor "performance" may decide which speed to use
within this range.
current CPU frequency is 1.20 GHz.
...
我怎样才能让所有核心以 2.2GHz 的速度运行?
谢谢