CPU frequency governor? [Solved]

Issues related to applications and software problems and general support
Post Reply
mathog
Posts: 142
Joined: 2008/07/09 23:52:06

CPU frequency governor? [Solved]

Post by mathog » 2020/03/24 20:01:23

How does one enable CPU frequency scaling to save power in CentOS 8? The settings seem to be different from CentOS 7. These are two (nearly) identical PowerEdge T110 II machines, but running different CentOS versions, and unfortunately, with different CPUs. The speed is adjusted on the CentOS 7 one, but not (much) on the CentOS 8 one.

CentOS 7 CPU E31270 @ 3.40GHz:

Code: Select all

cpupower frequency-info
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: 1.60 GHz - 3.80 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1.60 GHz and 3.80 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: 1.60 GHz (asserted by call to hardware)
  boost state support:
    Supported: yes
    Active: yes
    3500 MHz max turbo 4 active cores
    3600 MHz max turbo 3 active cores
    3700 MHz max turbo 2 active cores
    3800 MHz max turbo 1 active cores
cat /proc/cpuinfo | grep MH
cpu MHz		: 1599.768
cpu MHz		: 1599.975
cpu MHz		: 1599.768
cpu MHz		: 1599.975
cpu MHz		: 1599.975
cpu MHz		: 1599.975
cpu MHz		: 1599.145
cpu MHz		: 1599.975
Centos 8 i3-2100 CPU @ 3.10GHz

Code: Select all

cpupower frequency-info
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: 1.60 GHz - 3.10 GHz
  available cpufreq governors: performance powersave
  current policy: frequency should be within 1.60 GHz and 3.10 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 3.09 GHz (asserted by call to kernel)
  boost state support:
    Supported: no
    Active: no
    3100 MHz max turbo 4 active cores
    3100 MHz max turbo 3 active cores
    3100 MHz max turbo 2 active cores
    3100 MHz max turbo 1 active cores
cat /proc/cpuinfo | grep MH
cpu MHz		: 3010.770
cpu MHz		: 2899.884
cpu MHz		: 3079.069
cpu MHz		: 2683.355
On the CentOS 8 system I tried

Code: Select all

echo powersave | tee /sys/devices/system/cpu/cpufreq/policy*/scaling_governor
and while those files then showed "powersave", the CPU speeds didn't change much, they dropped about 100MHz. Both systems are basically idle. The cpupower output only changed here:

Code: Select all

  current policy: frequency should be within 1.60 GHz and 3.10 GHz.
                  The governor "powersave" may decide which speed to use
                  within this range.
  current CPU frequency: Unable to call hardware
  current CPU frequency: 2.84 GHz (asserted by call to kernel)
New speeds

Code: Select all

cat /proc/cpuinfo | grep MH
cpu MHz		: 2576.632
cpu MHz		: 2944.747
cpu MHz		: 2717.735
cpu MHz		: 3093.453
Thanks.
Last edited by mathog on 2020/03/24 22:34:29, edited 1 time in total.

bonedome
Posts: 132
Joined: 2017/04/22 08:11:04

Re: CPU frequency governor?

Post by bonedome » 2020/03/24 20:55:03

Hello
just a thought, are you sure the system is idle, there's no clamav or rkhunter type program or inefficient graphics driver running in the background.
Is there a setting in your BIOS that enables freq scaling.
Are you running gnome wayland, have you tried gnome xorg or a different desktop/window manager ?

User avatar
TrevorH
Forum Moderator
Posts: 28026
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: CPU frequency governor?

Post by TrevorH » 2020/03/24 21:53:05

Is tuned running and what profile did you set with tuned-adm?
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

mathog
Posts: 142
Joined: 2008/07/09 23:52:06

Re: CPU frequency governor?

Post by mathog » 2020/03/24 22:25:56

TrevorH wrote:
2020/03/24 21:53:05
Is tuned running and what profile did you set with tuned-adm?
It is running on both systems. I do not recall setting a tuned profile on either system, but they differ. The CO7 is "balanced" and the CO8 is "throughput-performance". Possibly this was set indirectly by some choices made at time of installation?

On the CentOS 8 system:

Code: Select all

tuned-adm profile balanced
cat /proc/cpuinfo | grep MH
cpu MHz		: 1596.411
cpu MHz		: 1596.441
cpu MHz		: 1596.401
cpu MHz		: 1596.393
cat /etc/tuned/active_profile
balanced
That is what it should be on the mostly idle system. Will reboot it now and see if that "sticks".
Edit: It did.

Problem solved. Thanks.

Post Reply

Return to “CentOS 8 - General Support”