The officially official Devuan Forum!

You are not logged in.

#1 2018-02-07 15:06:32

pj1967
Member
Registered: 2017-06-24
Posts: 7  

CPU throttling

Hi all,

I'm trying to figure out what mechanism devuan jessie uses to throttle down the CPU clock...basically, I want to turn that off and let the CPU run at full clock speed.

cpufrequtils isn't installed, and I'm fairly certain that the BIOS is set to not throttle...so...any ideas?

THX,

PJ

Offline

#2 2018-02-07 17:35:28

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,132  

Re: CPU throttling

Looks like it's built into the kernel these days. (see below)
https://www.kernel.org/doc/Documentatio … ernors.txt

You can still use cpufrequtils to modify the settings, but according to the debian wiki, cpufrequtils is being replaced by cpupower. There's a linux-cpupower package in jessie-backports, ascii/stretch and later.


 :~$ grep FREQ /boot/config-3.16.0-5-amd64 
CONFIG_CPU_FREQ=y
CONFIG_CPU_FREQ_GOV_COMMON=y
CONFIG_CPU_FREQ_STAT=m
# CONFIG_CPU_FREQ_STAT_DETAILS is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_POWERSAVE is not set
# CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE is not set
CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
# CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE is not set
CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
CONFIG_CPU_FREQ_GOV_POWERSAVE=m
CONFIG_CPU_FREQ_GOV_USERSPACE=m
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=m
CONFIG_X86_PCC_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ=m
CONFIG_X86_ACPI_CPUFREQ_CPB=y
CONFIG_X86_AMD_FREQ_SENSITIVITY=m
# CONFIG_PM_DEVFREQ is not set

Offline

#3 2018-02-07 18:35:18

pj1967
Member
Registered: 2017-06-24
Posts: 7  

Re: CPU throttling

Ah, ok, I'll use cpufrequtils for jessie.

THX,

PJ

Offline

#4 2018-02-22 18:02:58

pj1967
Member
Registered: 2017-06-24
Posts: 7  

Re: CPU throttling

So, tinkering around with this didn't yield what I wanted.  As you indicated, the default governor is "performance" which still throttles down the CPU cores when idle.  With redhat 6 (2.6 .32), the kernel config file has similar entries as above, but with cpuspeed disabled, the CPU run at full clock speed even when idle.  I suspect I might need to recompile the kernel with the CPU governors disabled?

Offline

#5 2018-02-22 21:19:39

fsmithred
Administrator
Registered: 2016-11-25
Posts: 1,132  

Re: CPU throttling

After our previous exchange, I checked my laptop, and the default governer was powersave. Good for a laptop, but that's where I build isos. Been using cpufrequtils since then, and I just now installed and tried linux-cpupower.

cpupower set -b 0 gives me slightly higher speeds than cpufreq-set -g performance but in both cases, speeds drop at idle. I don't know if recompiling the kernel without the governers is necessary or even possible or if it would work. You might be able to just unload the module(s) to get constant full speed.

Offline

#6 2019-06-28 18:06:40

pj1967
Member
Registered: 2017-06-24
Posts: 7  

Re: CPU throttling

Ok, after nearly a year and a half, I cycled back around to this issue and finally found a solution.  As I suspected, it's not a specific issue with Devuan and involves the intel_pstate kernel "module" (not really a module, rather a compiled in feature of the generic kernel).  To make a long story short, to prevent CPU throttling, you have to disable the intel_pstate feature in the kernel...the obvious way that I know to do this is to add 'intel_pstate=disable' to the kernel command line in grub....e.g.

1)  Append 'intel_pstate=disable' to the GRUB_CMDLINE_LINUX_DEFAULT variable in /etc/default/grub
2) run update-grub
3) reboot

And, viola!  All cpu cores run at their rated max clock speed all the time (no turbo mode, AFAIK).

--PJ

PS:  I love the Devuan distro!  Keep up the good work/fight devs!

Last edited by pj1967 (2019-06-28 18:12:26)

Offline

#7 2019-06-28 21:19:12

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 266  
Website

Re: CPU throttling

Did you try modifying /sys/devices/system/cpu/intel_pstate/* instead of just disabling it?


Fabricando fit faber

Offline

#8 2019-07-01 17:00:05

pj1967
Member
Registered: 2017-06-24
Posts: 7  

Re: CPU throttling

Head_on_a_Stick wrote:

Did you try modifying /sys/devices/system/cpu/intel_pstate/* instead of just disabling it?

I did some minimal perusing of /sys/devices/system/cpu/intel_pstate and didn't attempt to change anything.  I certainly will try that, but my initial idea was to "brute force" remove any kind of cpu throttle/governor, then maybe back off that brute force method with more subtle changes.

Offline

Board footer