irusanov / ZenStates

https://zenstates.protonrom.com
GNU General Public License v3.0
90 stars 17 forks source link

TurboBoost P0 temperature limited #5

Open Engraulis opened 4 years ago

Engraulis commented 4 years ago

Hi !i! Not an Issue, just asking for a new feature. Sorry if writing in wrong place (I'm totally newbie here).

Ryzen 1600 after entering "OverClock" mode is totally ignoring current and power limits. Performance Enhancer and over features below it - is grayed out in ZenStates (look's like not compatible with new AGESA). My "PCCooler GI-X4" can only cooldown CPU at ALL core overclock 3.8GHz 1.365v. But CPU can handle 4.15GHz 1.42v in lower threaded programs (CEMU for example) without overheating.

I'm asking to add new feature - let's call it something like "TurboBoost P0 temperature limited". ZenState service will be measuring temp and automatically change P0 settings based on it.

Next I'll write in BASIC:

10 Read tDIE 20 IF tDIE <65C then set vCore=1.420v, set P0 multipler=x41.5 30 IF tDIE >65C then set vCore=1.365v, set P0 multipler=x38.0
40 IF tDIE >85C then set vCore=1.300v, set P0 multipler=x34.0
50 wait some miliseconds 60 GoTo 10

So we have 3 differen P0 states based on tDIE temperature.

  1. PO for low threaded or low power consumption programs
  2. P0 for multithreaded programs
  3. P0 for LinX and over AVX stress test.

We need to ask user 10 variables: 3temp; 3voltages; 3multiplers; 1waiting.

As I understand P0 is used only under some load and without it CPU will be in P2 or C6 state. This is the only way I can think about - to boost Ryzen 1?00 without overheating problem.

The only question is - how often read temperature? 1000ms - is too long I think - LinX can quickly overheat CPU. Reading temp too often - may be add some stuttering/microfreezing in games (and maybe not :)

Anyway thanks for you attention. CU

Engraulis commented 4 years ago

Antoher thoughts.

Windows PowerPlan can be used to change P-states. But how manage it to use CPU temp? May be adding some thermoresistor to switch to battery mode - then CPU heatsink is overheated.

powercfg /CHANGE moderate /processor-throttle-dc adaptive

irusanov commented 4 years ago

Hi, That's a cool idea (pun intended), but temperature, voltages and power are very dynamic on AMD and would require very frequent polling. Don't have plans on adding that feature in the current app. Maybe a dedicated app would be better.

I think it could be done, but it will only work with all-core fixed overclock with user-defined limits. I don't know how to detect AVX workload, so that might be a problem.

Engraulis commented 4 years ago

all-core fixed overclock with user-defined limits

For my Ryzen 1700 (which is actually 8core Ryzen 1600): if CPU frequency set in BIOS to less then 3700 MHz (turboboost speed) then CPU use built in multipliers (100x34=base clock; 100x37=turboboost speed). BLCK overclocking can be used to set this frequencies higher (111x37=4107MHz), but at BLCK this high GPU goes buggy (random GPU driver crash, even at PCIe version 1.0), and TDP limit is remain the same 65W (so I only see 4107MHz for half second per 1 minute = pointless).

For Ryzen 1700 - fixed clock means overclock mode. As I understand if CPU enter overclock mode - all limits are set too infinite. Current=1000; VRMWattage=1000; TDP=1000? The only thing limiting CPU from catching fire is throttle temp=95C. As I know after CPU enters OC mode - is no way too set any limits back.

So instead of setting this limits in bios - I'm asking to implement similar function by ZenState service (lowering multiplier and voltage than temperature is HOT).

I don't know how to detect AVX workload, so that might be a problem.

There is no need to detect it. AVX is only dangerous as it heat CPU much. Heat must be measured as CPU temperature.

temperature, voltages and power are very dynamic on AMD and would require very frequent polling

Basically what I'm talking about - something similar to PBO in Ryzen2000. Overclock CPU until it starts overheating. For example let say what my PCCooler with 4 heat pipes can dissipate 125Watt. So we need to dynamically change multiplier/voltage depending on the load to stay in that 125W limit. I see the only reasonable way todo it - measure temp.

Yes we can reed current*voltage=W But as you say if we can read it only at low frequencies, then peak current will make voltage drop and this formula became inaccurate.

PS: actually all this speech we have here is dreaming about configurable TDP. By this cTDP does not work in my BIOS, and as I know at all desktop Ryzens (it's actually works for mobile Ryzen CPU's). And new BIOS for my motherboard will became only with new AGESA (Ryzen4000).