AskOverflow.Dev

AskOverflow.Dev Logo AskOverflow.Dev Logo

AskOverflow.Dev Navigation

  • 主页
  • 系统&网络
  • Ubuntu
  • Unix
  • DBA
  • Computer
  • Coding
  • LangChain

Mobile menu

Close
  • 主页
  • 系统&网络
    • 最新
    • 热门
    • 标签
  • Ubuntu
    • 最新
    • 热门
    • 标签
  • Unix
    • 最新
    • 标签
  • DBA
    • 最新
    • 标签
  • Computer
    • 最新
    • 标签
  • Coding
    • 最新
    • 标签
主页 / ubuntu / 问题 / 1320094
Accepted
EllistonV
EllistonV
Asked: 2021-03-01 12:11:13 +0800 CST2021-03-01 12:11:13 +0800 CST 2021-03-01 12:11:13 +0800 CST

可能的最低频率是多少?

  • 772

CPU 的最低可能频率是多少(在我的情况下,我有 Intel® Core™ i7-8750H CPU @ 2.20GHz × 12)

cpufreq
  • 1 1 个回答
  • 103 Views

1 个回答

  • Voted
  1. Best Answer
    Doug Smythies
    2021-03-02T17:55:05+08:002021-03-02T17:55:05+08:00

    这个答案使用原始命令。其他人可能会添加有关 tlp 或其他更高级别实用程序的另一个答案。

    最低 CPU 频率并不总是意味着最长的电池寿命。有时,以更高的 CPU 频率更快地完成任务会导致在深度、低功耗、空闲状态下的额外时间如此之多,以至于实际上节省了能量。这方面的术语是“竞相空闲”。性能/功率曲线的高度非线性部分位于“涡轮增压”区域。因此,通常只需禁用涡轮就足够了。

    默认情况下,您的计算机应使用 intel_pstate CPU 频率缩放驱动程序和 powersave 调控器。检查通过,例如:

    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_driver
    /sys/devices/system/cpu/cpufreq/policy0/scaling_driver:intel_pstate
    /sys/devices/system/cpu/cpufreq/policy1/scaling_driver:intel_pstate
    /sys/devices/system/cpu/cpufreq/policy2/scaling_driver:intel_pstate
    /sys/devices/system/cpu/cpufreq/policy3/scaling_driver:intel_pstate
    /sys/devices/system/cpu/cpufreq/policy4/scaling_driver:intel_pstate
    /sys/devices/system/cpu/cpufreq/policy5/scaling_driver:intel_pstate
    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
    /sys/devices/system/cpu/cpufreq/policy0/scaling_governor:performance
    /sys/devices/system/cpu/cpufreq/policy1/scaling_governor:performance
    /sys/devices/system/cpu/cpufreq/policy2/scaling_governor:performance
    /sys/devices/system/cpu/cpufreq/policy3/scaling_governor:performance
    /sys/devices/system/cpu/cpufreq/policy4/scaling_governor:performance
    /sys/devices/system/cpu/cpufreq/policy5/scaling_governor:performance
    

    哦,好吧,让我们解决这个问题:

    doug@s18:~$ echo powersave | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
    powersave
    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
    /sys/devices/system/cpu/cpufreq/policy0/scaling_governor:powersave
    /sys/devices/system/cpu/cpufreq/policy1/scaling_governor:powersave
    /sys/devices/system/cpu/cpufreq/policy2/scaling_governor:powersave
    /sys/devices/system/cpu/cpufreq/policy3/scaling_governor:powersave
    /sys/devices/system/cpu/cpufreq/policy4/scaling_governor:powersave
    /sys/devices/system/cpu/cpufreq/policy5/scaling_governor:powersave
    

    现在,如果 BIOS 中没有禁用 turbo,它将默认启用,因此禁用它:

    grep . /sys/devices/system/cpu/intel_pstate/no_turbo
    doug@s18:~$ grep . /sys/devices/system/cpu/intel_pstate/no_turbo
    0
    doug@s18:~$ echo 1 | sudo tee /sys/devices/system/cpu/intel_pstate/no_turbo
    1
    doug@s18:~$ grep . /sys/devices/system/cpu/intel_pstate/no_turbo
    1
    

    默认情况下,应在您的计算机上启用 HWP(硬件 Pstate),因此您还可以告诉它更喜欢省电而不是性能:

    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/energy_performance*
    /sys/devices/system/cpu/cpufreq/policy0/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference:balance_performance
    /sys/devices/system/cpu/cpufreq/policy1/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference:balance_performance
    /sys/devices/system/cpu/cpufreq/policy2/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference:balance_performance
    /sys/devices/system/cpu/cpufreq/policy3/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference:balance_performance
    /sys/devices/system/cpu/cpufreq/policy4/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference:balance_performance
    /sys/devices/system/cpu/cpufreq/policy5/energy_performance_available_preferences:default performance balance_performance balance_power power
    /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference:balance_performance
    

    和:

    doug@s18:~$ echo power | sudo tee /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
    power
    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/energy_performance_preference
    /sys/devices/system/cpu/cpufreq/policy0/energy_performance_preference:power
    /sys/devices/system/cpu/cpufreq/policy1/energy_performance_preference:power
    /sys/devices/system/cpu/cpufreq/policy2/energy_performance_preference:power
    /sys/devices/system/cpu/cpufreq/policy3/energy_performance_preference:power
    /sys/devices/system/cpu/cpufreq/policy4/energy_performance_preference:power
    /sys/devices/system/cpu/cpufreq/policy5/energy_performance_preference:power
    

    现在。如果您仍然想降低最大 CPU 频率,您可以通过两种方法来实现:

    doug@s18:~$ grep . /sys/devices/system/cpu/intel_pstate/*perf_pct
    /sys/devices/system/cpu/intel_pstate/max_perf_pct:100
    /sys/devices/system/cpu/intel_pstate/min_perf_pct:17
    doug@s18:~$ echo 17 | sudo tee /sys/devices/system/cpu/intel_pstate/max_perf_pct
    17
    

    或者:

    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_m??_freq
    /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy0/scaling_min_freq:800000
    /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy1/scaling_min_freq:800000
    /sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy2/scaling_min_freq:800000
    /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy3/scaling_min_freq:800000
    /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy4/scaling_min_freq:800000
    /sys/devices/system/cpu/cpufreq/policy5/scaling_max_freq:3700000
    /sys/devices/system/cpu/cpufreq/policy5/scaling_min_freq:800000
    doug@s18:~$ echo 800000 | sudo tee /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
    800000
    doug@s18:~$ grep . /sys/devices/system/cpu/cpufreq/policy*/scaling_max_freq
    /sys/devices/system/cpu/cpufreq/policy0/scaling_max_freq:800000
    /sys/devices/system/cpu/cpufreq/policy1/scaling_max_freq:800000
    /sys/devices/system/cpu/cpufreq/policy2/scaling_max_freq:800000
    /sys/devices/system/cpu/cpufreq/policy3/scaling_max_freq:800000
    /sys/devices/system/cpu/cpufreq/policy4/scaling_max_freq:800000
    /sys/devices/system/cpu/cpufreq/policy5/scaling_max_freq:800000
    

    现在,让我们使用 turbostat 在其中一些条件下观察功率,使用我所知道的最残酷的 CPU 压力程序 prime95 酷刑测试:

    $ sudo ./turbostat --Summary --quiet --show Busy%,Bzy_MHz,IRQ,PkgWatt,PkgTmp,RAMWatt --interval 6
    Busy%   Bzy_MHz IRQ     PkgTmp  PkgWatt RAMWatt
    0.28    800     320     32      2.07    1.89
    2.17    800     1136    33      2.10    1.89
    99.36   4088    36118   67      105.53  1.96 <<< level 2 power throttle alrady active
    99.32   4131    36077   62      108.98  1.96
    100.12  4071    36076   64      99.94   1.96 <<< level 1 power throttle, 100 watts.
    100.12  4070    36074   65      99.92   1.96
    100.12  4069    36078   65      99.94   1.96
    100.11  4067    36106   65      99.92   1.96
    100.11  4066    36077   65      99.91   1.96
    100.11  4065    36091   65      99.93   1.96
    100.11  4063    36177   65      99.92   1.93
    100.10  4061    36072   65      99.93   1.90
    100.10  4059    36083   65      99.92   1.90
    100.14  3966    36254   58      93.05   1.90
    100.26  3700    36109   58      72.93   1.90 <<< turbo disabled
    100.26  3700    36073   58      72.94   1.90
    100.26  3700    36087   59      73.19   1.89
    100.26  3369    36298   49      60.96   1.89
    100.26  2800    36081   49      39.78   1.89 <<< start reducing max CPU freq more.
    100.26  2800    36076   48      39.82   1.89
    100.26  2800    36202   48      39.76   1.89
    100.26  2371    36128   45      30.00   1.89
    100.26  2300    36168   45      28.30   1.89
    100.26  2300    36262   45      28.20   1.90
    100.26  1976    36122   43      22.39   1.90
    100.26  1900    36072   43      20.99   1.90
    100.26  1900    36071   43      20.95   1.90
    100.26  1900    36205   43      20.96   1.90
    100.26  1486    36122   40      14.81   1.90
    100.26  1400    36100   40      13.55   1.90
    100.26  1400    36073   40      13.54   1.90
    100.26  1400    36205   40      13.60   1.90
    100.26  1082    36116   39      9.83    1.90
    100.26  1000    36076   39      8.89    1.90
    100.26  1000    36195   38      8.88    1.90
    100.26  878     36131   38      7.84    1.89
    100.26  800     36075   38      7.19    1.89 <<< until lowest possible
    100.26  800     36070   38      7.22    1.89
    100.26  800     36086   38      7.26    1.89
    
    • 0

相关问题

  • 如何一次为所有内核设置 CPU 频率缩放调节器?

  • cpufreq-selector,cpufreq-info 报告错误的最大速度 [关闭]

  • 在联想笔记本电脑上禁用 CPU 频率缩放

Sidebar

Stats

  • 问题 205573
  • 回答 270741
  • 最佳答案 135370
  • 用户 68524
  • 热门
  • 回答
  • Marko Smith

    如何运行 .sh 脚本?

    • 16 个回答
  • Marko Smith

    如何安装 .tar.gz(或 .tar.bz2)文件?

    • 14 个回答
  • Marko Smith

    如何列出所有已安装的软件包

    • 24 个回答
  • Marko Smith

    无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗?

    • 25 个回答
  • Martin Hope
    Flimm 如何在没有 sudo 的情况下使用 docker? 2014-06-07 00:17:43 +0800 CST
  • Martin Hope
    Ivan 如何列出所有已安装的软件包 2010-12-17 18:08:49 +0800 CST
  • Martin Hope
    La Ode Adam Saputra 无法锁定管理目录 (/var/lib/dpkg/) 是另一个进程在使用它吗? 2010-11-30 18:12:48 +0800 CST
  • Martin Hope
    David Barry 如何从命令行确定目录(文件夹)的总大小? 2010-08-06 10:20:23 +0800 CST
  • Martin Hope
    jfoucher “以下软件包已被保留:”为什么以及如何解决? 2010-08-01 13:59:22 +0800 CST
  • Martin Hope
    David Ashford 如何删除 PPA? 2010-07-30 01:09:42 +0800 CST

热门标签

10.10 10.04 gnome networking server command-line package-management software-recommendation sound xorg

Explore

  • 主页
  • 问题
    • 最新
    • 热门
  • 标签
  • 帮助

Footer

AskOverflow.Dev

关于我们

  • 关于我们
  • 联系我们

Legal Stuff

  • Privacy Policy

Language

  • Pt
  • Server
  • Unix

© 2023 AskOverflow.DEV All Rights Reserve