[Plugin] CoreFreq


Recommended Posts

On 8/14/2023 at 6:13 AM, CyrIng said:

Press key p to open the "Processor" window and scroll down to bottom. 

 

You can also export the same using option:

corefreq-cli -s

Then post the output as code in reply. 

 

Turbo boost is a multifactorial feature:

* IDA available

* Speed Step Enable 

* C-States activated

* Idle loop using mwait or I/O-wait operating by kernel

* Boosted frequencies well programmed in descending orders from single to all (ie 8 simultaneous) core(s) 

* Target Frequency P-state equal BCLK (Max Ratio) plus at least one bin

+ TDP > Turbo Activation : preferably set to Auto (aka value zero) 

* No other limitation such as ODCM or Energy Policy Bias Hint or misc PL (Power Limiters) 

 

A competitive feature is HWP which follows rules of desired Frequency requests.

HWP has a programmable Target and Max ratios you'll set in the Processor window.

An Energy EPP scaler in window shortkey `o`

 

Remarks:

* Prerequisite is to activate HWP.

Press `z` key to enable or check its current state

* HWP can only be disabled by reboot. 

* BIOS is also managing HWP

* Kernel is also attempting to activate HWP

 

You have to check by which Engine is governed your CPU.

HWP or Turbo Boost ? 

 

FYI the closest CFL Xeon I had logged is this E-2246G

 

image.thumb.png.fd26d4e428c5febdf2a5dfee8dbb9cd3.png

image.thumb.png.665b9fd6f8efc11b05c96a8c757fcc0a.png

image.thumb.png.a2a0bed523cd7becb8d9d670a3bd2ef9.png

image.png.9e521c3f44fb7bb98a7506bab603b0aa.png

  • Like 1
Link to comment
15 minutes ago, CyrIng said:

Except a missing Bar address for I/O C-States, but not required, everything looks well programmed for Turbo boost. 

Where is your issue ? 

 

That the settings do not persist after I reboot (using the info provided on how to do that a few pages back)

Link to comment
On 8/17/2023 at 4:44 PM, CyrIng said:

So the right parameter you need is:

Ratio_HWP=-1,37,-1

 

I found that CPU still jumping to 43 even if 37 was truly settled automatically after reboot (i see it in F4 - p).

I change it manually to 43 and again to 37 and now it works as expected - not exceed 37 and shows lower temperature and MHz during stress.

Edited by Nuke
Link to comment
22 hours ago, Nuke said:

I found that CPU still jumping to 43 even if 37 was truly settled automatically after reboot (i see it in F4 - p).

I change it manually to 43 and again to 37 and now it works as expected - not exceed 37 and shows lower temperature and MHz during stress.

The thing with HWP is that it is auto-managed by Processor.

What you set is a frequency ratio request.

You may succed by constraining between a HWP Min and a HWP Max value but also a HWP Target, try all at 37

 

EDIT:

And also give a try to the HWP-EPP Energy Profile hint.

 

HWP (Intel) or CPPC (AMD) EPP effect is to limit frequency. 

 

Driver parameter is `HWP_EPP` with a range value between 0 (No Energy savings) and 255 (Max savings) 

 

EPP is also available in the UI, within the window "Power, Current & Thermal" 

 

Edited by CyrIng
Link to comment

Hello,

 

I think I'm too stupid!
I can't manage to set the whole thing via corefreqk.conf so that the settings are already loaded at boot time.

 

Here is an example:
options corefreqk TurboBoost_Enable=1 SpeedStep_Enable=1 Register_CPU_Idle=1 Register_Governor=1 Register_ClockSource=1    

Now comes the problem, I can't find all the options I want to set. For example, "NMI registered". In the Gui I can set it to "on". Which parameter should I enter in corefreqk.conf for this? According to the parameter list, there is only one "NMI_Disable". Should I enter this and set it to =0?

 

Sorry if I'm being too stupid!

I have attached scrennshots of my settings below.
Maybe someone can help me to enter the correct values.

 

Thanks in advance!

 

Greetings Bernd

corefreq_3.1.png

corefreq_2.png

corefreq_1.png

Link to comment
9 hours ago, Bernd Matthießen said:

Now comes the problem, I can't find all the options I want to set.

## corefreqk.conf
Register_ClockSource=1 Register_Governor=1 Register_CPU_Idle=1 Register_CPU_Freq=1 PkgCStateLimit=6 NMI_Disable=0 AutoClock=1 HWP_Enable=1 Ratio_HWP=-1,-1,47

 

echo "corefreq_tsc" > /sys/devices/system/clocksource/clocksource0/current_clocksource

 

After reviewing code, I have noticed that:

  • PkgCStateLimit is not implemented with AMD/Zen yet
  • HWP_Enable only works with Zen MSR registers HWP capable. 
    Parameter is not implemented for CPPC Firmware mode yet
  • Thanks 2
Link to comment
7 hours ago, CyrIng said:
## corefreqk.conf
Register_ClockSource=1 Register_Governor=1 Register_CPU_Idle=1 Register_CPU_Freq=1 PkgCStateLimit=6 NMI_Disable=0 AutoClock=1 HWP_Enable=1 Ratio_HWP=-1,-1,47

 

echo "corefreq_tsc" > /sys/devices/system/clocksource/clocksource0/current_clocksource

 

After reviewing code, I have noticed that:

  • PkgCStateLimit is not implemented with AMD/Zen yet
  • HWP_Enable only works with Zen MSR registers HWP capable. 
    Parameter is not implemented for CPPC Firmware mode yet

 

Thank you for the values!
Works only partially:
AutoClock is still set to "off" even if I enter "autoClock=1". Should I try another value (2) here?

In "Kernel Data", "C3" is still entered for "Idle Limit". How can I set the value directly to "C6" at start-up? It works via the Gui.

Under "Window->Processor", the value "3" is still entered for TGT under CPPC. Even if I set this manually from "1", the value then changes again automatically at some point. Sometimes to "3", sometimes to "6".... The value indicates the lowest frequency that the processor should reach, or am I misunderstanding this?

Everything else worked!

Here is the content of my corefreqk.conf again:

 

options corefreqk TurboBoost_Enable=1 SpeedStep_Enable=1 Register_CPU_Idle=1 Register_Governor=1 Register_ClockSource=1 PkgCStateLimit=6 NMI_Disable=0 AutoClock=1 HWP_Enable=1 Ratio_HWP=-1,-1,47

 

Link to comment
34 minutes ago, Bernd Matthießen said:

AutoClock is still set to "off" even if I enter "autoClock=1". Should I try another value (2) here?

 

`AutoClock=2` is the default. You can force use it.

0: Pure specs BCLK

1: Estimate BCLK once during driver startup

2: Estimate BCLK at every monitoring loop

 

Remark:

Parameter case matters in CoreFreq.

I did it on a purpose because I don't want Users to mess up with hardware without understanding the parameter meaning

 

Thus, spelling is `AutoClock`

 

41 minutes ago, Bernd Matthießen said:

In "Kernel Data", "C3" is still entered for "Idle Limit". How can I set the value directly to "C6" at start-up? It works via the Gui.

 

That's not programmed for Ryzen yet.

It's on the to-do list.

Please follow the development branch for early testings.

 

45 minutes ago, Bernd Matthießen said:

Even if I set this manually from "1", the value then changes again automatically at some point. Sometimes to "3", sometimes to "6"

 

Because your Processor is managed by the kernel module `amd-pstate`

If you want CoreFreq to fully control CPPC, you have to prevent `amd-pstate` from being auto-load by Kernel.

Please see the instructions to blacklist any "CPU-Freq driver"

 

56 minutes ago, Bernd Matthießen said:

Here is the content of my corefreqk.conf again:

 

Syntax looks OK to me

 

  • Thanks 2
Link to comment
On 8/25/2023 at 3:21 PM, CyrIng said:

Which UI settings you don't get or find as driver parameters ? 

 

Hi,

Sorry things happened IRL and now i'm back to this.

image.thumb.png.815b29a11349bd660f43303e421bdb91.png

 

How can I keep core 0/1/2/3 turned on turbo all the time? that script thing didn't work.

image.png.0c9c27827dd69b12da82a49d6cd897e3.png

 

How could I keep these settings saved also?

These are the defaults:

image.thumb.png.3adc2ee2cd2fe96b92c6ba5e1f7d4ab2.png

 

Link to comment
2 hours ago, sunwind said:

How can I keep core 0/1/2/3 turned on turbo all the time?

 

Unfortunately no such feature to keep Turbo stressing triggered right at CoreFreq startup. 

 

CPU stressing functions are activated manually from the UI. 

 

Those functions have been created to verify the processor operating limits like max frequency, max temperature, max voltage, max watts and so on. 

 

Package cpu-burn might be what you need. 

 

2 hours ago, sunwind said:

How could I keep these settings saved also?

 

According to your screenshot, the parameters are `ThermalScope`, `VoltageScope` and `PowerScope`

For these 3 parameters, values are `0:None; 1:SMT; 2:Core; 3:Package` 

 

For the others, see my above advices answered to @Bernd Matthießen

 

@ich777  is btw providing all startup parameters within his Plugin help.

 

Link to comment
6 hours ago, Bernd Matthießen said:

Oops

I will look into this later today.

 

EDIT: Sorry this was my fault, the upload from the packages to GitHub failed for some reason...?

The installation should work in a few minutes.

 

EDIT2: I have now built in another check for GitHub if the upload failed to notify me.

  • Thanks 2
Link to comment
  • 4 weeks later...
  • 4 weeks later...
On 9/27/2023 at 5:17 AM, CyrIng said:

Yes you can. From the UI "Settings" (F2) menu, go to "HotPlug CPU" then select/scroll to the CPU number to toggle its state from Enable to Disable

Thanks it seemed to fix itself. think it was a ram issue.

 

What's the way to enable turbo boost on all cores on startup?

I have been using > options corefreqk TurboBoost_Enable=1 0:None; 1:SMT; 2:Core; 3:Package

in modprobe.c corefreq.conf

 

Can it be added as a 'userscript' here?

image.thumb.png.8db1c3935c74326630c15f753e35cada.png

 

Thanks again.

Link to comment
22 minutes ago, sunwind said:

Can it be added as a 'userscript' here?

Only if this can be done through bash but I think that @CyrIng meant you have to do it in CoreFreq itself.

 

23 minutes ago, sunwind said:

What's the way to enable turbo boost on all cores on startup?

What Unraid version are you using? If you are using 6.12.4 go to Tools -> System Drivers

Search for the module corefreqk and at "modprobe.d config file" enter:

options corefreqk TurboBoost_Enable=1

and click "Done" at the bottom.

 

But shouldn't TurboBoost be enabled by default?

Link to comment
1 hour ago, ich777 said:

Only if this can be done through bash but I think that @CyrIng meant you have to do it in CoreFreq itself.

 

What Unraid version are you using? If you are using 6.12.4 go to Tools -> System Drivers

Search for the module corefreqk and at "modprobe.d config file" enter:

options corefreqk TurboBoost_Enable=1

and click "Done" at the bottom.

 

But shouldn't TurboBoost be enabled by default?

 

It should be yeah but mine never was. Anyway I realized I renamed the .cfg file to disable it at one point all I had do was rename it. doh.

 

options corefreqk TurboBoost_Enable=1 0:None; 1:SMT; 2:Core; 3:Package

 

I have that in it.

 

image.thumb.png.90930007cc0a77be77c856c397e817bf.png

 

That means my CPU is running that fast right? And my temps are those? Because that seems pretty good. I've had it like that an hour and been watching plex and things on it. Should I leave it like that?

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.