Page 1 of 1

Max CPU frequency

PostPosted: May 15th, '15, 06:15
by fox
Hello,

I installed Mageia 5 RC and I noticed that the processor is running at full speed all the time. It's a phenom II 720, which in previous versions of Mageia the power states varied from 800 to 2800 MHz, depending on load. In M5 it runs at 2800 and the computer is much noisier, probably the power consumption is higher.

Code: Select all
[katz@localhost ~]$ cpupower frequency-info
analyzing CPU 0:
  driver: acpi-cpufreq
  CPUs which run at the same hardware frequency: 0
  CPUs which need to have their frequency coordinated by software: 0
  maximum transition latency: 4.0 us.
  hardware limits: 800 MHz - 2.80 GHz
  available frequency steps: 2.80 GHz, 2.10 GHz, 1.60 GHz, 800 MHz
  available cpufreq governors: ondemand, conservative, powersave, userspace, performance
  current policy: frequency should be within 2.80 GHz and 2.80 GHz.
                  The governor "performance" may decide which speed to use
                  within this range.
  current CPU frequency is 2.80 GHz.
  boost state support:
    Supported: no
    Active: no


Can you help me?

Re: Max CPU frequency

PostPosted: May 15th, '15, 08:21
by tarakbumba
By default Mageia 5 sets cpu governor to "performance" like your frequency-info reports. You have an AMD cpu like me. I suggest to use "ondemand" governor which sets frequency depending on load and it can be set in /etc/default/cpupower permanently or using below command for a session:

Code: Select all
# cpupower frequency-set -g ondemand


You can read excellent this Arch wiki article for other options and possibilities.

Re: Max CPU frequency

PostPosted: May 15th, '15, 11:46
by doktor5000
It's not only about the governor, but also about the used driver and hence the resulting policy. I'm also using the default "performance" governor, and here the policy looks quite different:

┌─[doktor5000@Mageia5]─[11:33:03]─[~]
└──╼ LC_ALL=C 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: 0.97 ms.
hardware limits: 800 MHz - 4.40 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 4.40 GHz.
The governor "performance" may decide which speed to use
within this range.

current CPU frequency is 3.95 GHz.
boost state support:
Supported: yes
Active: yes


But the problem with AMD cpu's has already been reported for Mageia 2: https://wiki.mageia.org/en/Mageia_2_Err ... 29_CPU.27s

Re: Max CPU frequency

PostPosted: May 15th, '15, 12:00
by doktor5000
doktor5000 wrote:But the problem with AMD cpu's has already been reported for Mageia 2: https://wiki.mageia.org/en/Mageia_2_Err ... 29_CPU.27s

FWIW, I've reoped the bug report that was created back then for the same underlying issue (cpu running at full speed): https://bugs.mageia.org/show_bug.cgi?id=8839

Re: Max CPU frequency

PostPosted: May 15th, '15, 13:19
by tarakbumba
doktor5000 wrote:It's not only about the governor, but also about the used driver and hence the resulting policy. I'm also using the default "performance" governor, and here the policy looks quite different:

┌─[doktor5000@Mageia5]─[11:33:03]─[~]
└──╼ LC_ALL=C 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: 0.97 ms.
hardware limits: 800 MHz - 4.40 GHz
available cpufreq governors: performance, powersave
current policy: frequency should be within 800 MHz and 4.40 GHz.
The governor "performance" may decide which speed to use
within this range.

current CPU frequency is 3.95 GHz.
boost state support:
Supported: yes
Active: yes


But the problem with AMD cpu's has already been reported for Mageia 2: https://wiki.mageia.org/en/Mageia_2_Err ... 29_CPU.27s


It' s not that. See: https://bugs.mageia.org/show_bug.cgi?id=14584 and https://bugs.mageia.org/show_bug.cgi?id=13368

As Tmb stated on both reports (see https://bugs.mageia.org/show_bug.cgi?id=13368#c3) that currently we can not set a "ondemand" governor by default. Because, cpupower only supports "performance" and "powersave" for intel cpus. So, tmb decided to set "performance" as default knowing that it works for both AMD and Intel. Here, the problem is not driver but cpu governor. I can use "ondemand" governor on my Amd Phenom II cpu with expected results.

Re: Max CPU frequency

PostPosted: May 15th, '15, 14:21
by doktor5000
tarakbumba wrote:
doktor5000 wrote:It's not only about the governor, but also about the used driver and hence the resulting policy. I'm also using the default "performance" governor, and here the policy looks quite different:
[...]
But the problem with AMD cpu's has already been reported for Mageia 2: https://wiki.mageia.org/en/Mageia_2_Err ... 29_CPU.27s


It' s not that. See: https://bugs.mageia.org/show_bug.cgi?id=14584 and https://bugs.mageia.org/show_bug.cgi?id=13368

As Tmb stated on both reports (see https://bugs.mageia.org/show_bug.cgi?id=13368#c3) that currently we can not set a "ondemand" governor by default. Because, cpupower only supports "performance" and "powersave" for intel cpus. So, tmb decided to set "performance" as default knowing that it works for both AMD and Intel. Here, the problem is not driver but cpu governor. I can use "ondemand" governor on my Amd Phenom II cpu with expected results.

Thanks for the hint, added an Errata entry: default cpufreq governor is performance, some [AMD] users might need to switch to ondemand

Re: Max CPU frequency

PostPosted: May 15th, '15, 22:12
by fox
Thank you all for your answers. I forgot to mention in my first post that actually I tried
Code: Select all
cpupower frequency-set -g ondemand
and
Code: Select all
cpupower frequency-set -g powersave
but that didn't change anything. The frequency stays at full. I can't remember in Mageia 2 if it was the same. For sure in M4 it was working fine.
Hope this will be fixed for the final. Thanks again.