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 / 问题

问题[governor](ubuntu)

Martin Hope
arquin
Asked: 2019-09-12 23:10:56 +0800 CST

为什么负载下的CPU频率低于空闲时的频率?

  • 0

我在 i9-9900KF CPU 上有一个新的 Ubuntu 18.04 服务器,我想做一些繁重的计算。由于它有 16 个线程,我将所有 16 个线程都更改/sys/devices/system/cpu/cpu*/cpufreq/scaling_governor为性能模式并停止按需服务,sudo systemctl disable ondemand以便在重新启动后它会卡住(确实如此)。

结果令人费解。在更改之前(在省电调速器下),空闲时的频率为 800MHz(如预期的scaling_min_freq值)和负载下的 4700MHz(scaling_max_freq值为5000000)。

更改后,空闲频率如预期在5000MHz,但在负载下,它又是4700MHz......?因此,在负载下,调节器设置是什么并不重要,但使用性能调节器,空闲频率会更高。

这可能是什么原因造成的?我的电源单元应该适合 600W,而我只有主板、双风扇水冷器、M2 SSD 和 4 风扇机箱(所以我认为这里的电源应该不是问题......?)。

power-management performance cpu governor
  • 2 个回答
  • 1908 Views
Martin Hope
WarrenFaith
Asked: 2019-05-08 00:13:34 +0800 CST

CPU调控器在负载下自动更改为“性能”

  • 3

我有一台带有 Xubuntu 18.04 LTS 的联想 T570。我目前的问题是我的 cpu 速度步进有点发疯,并且做了它认为最好的事情。

示例:当我运行我的 IDE 并且在构建期间 CPU 负载增加时,调控器会自动更改。我在编译我的项目期间通过以下调用抓住了这一刻:

martin@martin-ThinkPad-T570:~$ while cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor; do sleep 1; done
powersave
powersave
performance
performance

cpufreq-info 告诉我这个:

martin@martin-ThinkPad-T570:~$ cpufreq-info 
cpufrequtils 008: cpufreq-info (C) Dominik Brodowski 2004-2009
Report errors and bugs to [email protected], please.
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: 4294.55 ms.
  hardware limits: 400 MHz - 3.50 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 3.50 GHz and 3.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.25 GHz.
analyzing CPU 1:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 1
  CPUs which need to have their frequency coordinated by software: 1
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 3.50 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 3.50 GHz and 3.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.36 GHz.
analyzing CPU 2:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 2
  CPUs which need to have their frequency coordinated by software: 2
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 3.50 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 3.50 GHz and 3.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.26 GHz.
analyzing CPU 3:
  driver: intel_pstate
  CPUs which run at the same hardware frequency: 3
  CPUs which need to have their frequency coordinated by software: 3
  maximum transition latency: 4294.55 ms.
  hardware limits: 400 MHz - 3.50 GHz
  available cpufreq governors: performance, powersave
  current policy: frequency should be within 3.50 GHz and 3.50 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 3.36 GHz.

请看一下

当前政策:频率应在 3.50 GHz 和 3.50 GHz 之间。调速器“性能”可以决定使用哪种速度

之后回到 powersave 我使用我的小脚本:

martin@martin-ThinkPad-T570:~$ cat cpu_freq_save.sh 
#!/bin/bash
sudo cpufreq-set -g powersave -c 0 --min 400MHz
sudo cpufreq-set -g powersave -c 1 --min 400MHz
sudo cpufreq-set -g powersave -c 2 --min 400MHz
sudo cpufreq-set -g powersave -c 3 --min 400MHz

这会重置最小频率和调速器,但只要我每次使用我的 IDE 再次编译调速器和最小频率再次更改时。

知道如何禁用该自动更改吗?

PS:如果您需要更多详细信息,请告诉我在哪里可以找到它们,我会提供

performance xubuntu cpu governor
  • 3 个回答
  • 2210 Views
Martin Hope
Jorengarenar
Asked: 2018-12-17 05:15:04 +0800 CST

即使使用“省电”调速器,CPU 频率也太高

  • 3

最近我注意到我的 CPU 大部分时间都处于高频状态,即使负载很小。

它是一个 i5-7300HQ 处理器,应该使用 800 MHz 和 2.5 GHz 之间的频率(3.5 GHz 与 Turbo Boost)。

现在即使负载约为 2-8%,我看到的频率通常在 2.6 到 3.2 GHz 之间,这意味着 CPU 几乎总是 Turbo Boosting。

之前它总是 900 - 1200 MHz。

缩放调节器设置为省电:

$ cat /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor
powersave
powersave
powersave
powersave

在/etc/default/grub我有一行:

GRUB_CMDLINE_LINUX_DEFAULT="quiet splash intel_pstate=disable scsi_mod.scan=sync"

在/etc/default/cpufrequtils:

GOVERNOR="powersave"

没有/sys/devices/system/cpu/intel_pstate/目录

我的系统规格是:

  • 笔记本电脑:HP Pavilion - 15-bc203nw
  • 操作系统:Ubuntu (Xubuntu) 18.04.1 LTS
  • CPU:英特尔酷睿 i5-7300HQ

编辑

在@WinEunuuchs2Unix 提出建议后,我再次获得了/sys/devices/system/cpu/intel_pstate/目录。

键入以下内容:

cd /sys/devices/system/cpu/cpu0/cpufreq && paste <(ls *) <(cat *)

给出输出:

affected_cpus                             0
cpuinfo_max_freq                          3500000
cpuinfo_min_freq                          800000
cpuinfo_transition_latency                0
energy_performance_available_preferences  default performance balance_performance balance_power power
energy_performance_preference             balance_performance
related_cpus                              0
scaling_available_governors               performance powersave
scaling_cur_freq                          3236541
scaling_driver                            intel_pstate
scaling_governor                          performance
scaling_max_freq                          3500000
scaling_min_freq                          3500000
scaling_setspeed                          <unsupported>

我该如何设置它powersave(只是在scaling_governor文件中更改它不会做任何事情)。

cpu governor intel cpufreq 18.04
  • 1 个回答
  • 5222 Views
Martin Hope
A Student at a University
Asked: 2010-09-10 07:49:10 +0800 CST

禁用“按需”CPU 缩放守护程序

  • 18

我有一台服务器,在升级到 10.04 时,它现在正在运行“按需”CPU 缩放守护程序。为什么会自动安装这个?我不希望我的服务器以牺牲性能为代价来节省电力。

cpu governor
  • 8 个回答
  • 44168 Views

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