Discussion Windows HPET setting affect Ryzen Zen3 idle voltage and temps

DimkaTsv

Commendable
Nov 7, 2021
171
25
1,640
Technically it is not so much of a question, as it is fact i noticed not so long ago.
I needed to turn Windows HPET on for some reason. Then next day i noticed that my idle voltages were decently higher than i usually had. I backtraced what i did last day and came to conclusion that that HPET change i made actually was only possible reason.
I am talking about these settings...
In command line (admin):
Code:
bcdedit /set useplatformclock true
bcdedit /set disabledynamictick no
In command line (admin):
Code:
bcdedit /deletevalue useplatformclock
bcdedit /set disabledynamictick yes
And about how they affect prolonged idle state

zWvDltE.jpg
LriXpyr.jpg

So as you may notice, enabling Windows HPET increased core usage, which affected Core C-states usage, so C0 and C1 usage increased at cost of C6 (as if could've been other way).
As another effect it made - increased idle voltage by whole 0.054V (not that it matters) and idle temps by 1-3 degrees. These tests took average of 21 minutes and graph of core voltage was written. Global polling period was set to 2000ms to have minimum affect on idle state (but voltages will remain same even with polling period of 50ms)
Only thing that should be noted, is that somehow with Windows HPET on voltage graph was way more smooth, but also without full idle dips to 0.85V

And for bonus...
p0mpA75.jpg
Y7fUtzA.jpg

So basically Windows HPET setting overrides BIOS one, and BIOS one actually didn't matter as fact. Even with BIOS HPET - disabled, it still works with AMD Ryzen innate HPET.
Probably for older CPU and non-Ryzen series too. it may be that BIOS HPET setting have more effect, that i cannot say for sure.
Also i don't know about Windows HPET and Intel CPU interaction.

P.S. It is just personal observation. If someone have something to add - you're welcome.
 
From https://www.anandtech.com/show/12678/a-timely-discovery-examining-amd-2nd-gen-ryzen-results/2

However, there are issues fundamental to the HPET design which means that it is not always the best timer to use. HPET is a continually upward counting timer, which relies on register recall or comparison metrics rather than a ‘set at x and count-down’ type of timer. The speed of the timer can, at times, cause a comparison to fail, depending on the time to write the compared value to the register and that time already passing. Using HPET for very granular timing requires a lot of register reads/writes, adding to the system load and power draw, and in a workload that requires explicit linearity, can actually introduce additional latency. Usually one of the biggest benefits to disabling HPET on some systems is the reduction in DPC Latency, for example.

The last sentence suggests that in some cases, HPET causes a lot of activity.
 
  • Like
Reactions: DimkaTsv
....
Also i don't know about Windows HPET and Intel CPU interaction.

P.S. It is just personal observation. If someone have something to add - you're welcome.

Very curious...I found the same effect on my 5800X system. Once the system became 'quiescent' (it's never really idle) I found core voltage drops almost 100mV on average and CPU clocks stay around base clocks (3700Mhz) much more eagerly.

From the above linked Anandtech article by @hotaru.hino it seems HPET trades it's increased timer accuracy (4-8 times more accurate) for timer call latency (up to 100 times slower) compared to the I-TSC timer. I wonder if the reduction in latency has a knock-on effect for some (at least) of the many background processes Windows constantly runs. The Windows Performance Counter System, for instance, seems a likely candidate to make a lot of timer calls and burn CPU cycles while waiting for the HPET. So maybe that could account for the greater CPU loading even if really small.

I have found no difference in performance, however. All GPU benchmarks come down within MoE. In 3DMark's case that can be due to their careful baselining of system configuration when it loads. But even quiescent power consumption is to low to meter either way.
 
Last edited:

DimkaTsv

Commendable
Nov 7, 2021
171
25
1,640
I have found no difference in performance, however.
Yeah, all performance difference is in statistical error margins. But! It can answer questions of some people "why my idle voltage is so high, is it normal?".
Just because HPET gives additional dummy load, CPU actually sees it as a load, and request more voltage than it would've requested.

HPET trades it's increased timer accuracy (4-8 times more accurate) for timer call latency (up to 100 times slower) compared to the I-TSC timer
Well after seeing that I-TSC have 10 mHz frequency, while HPET have 14.32 mHz. i am actually not sure, if HPET is that much more accurate.
Maybe it was for older CPU-s, which had lower i-TSC frequency, but nowadays.
 
Yeah i saw that too, but wasn't sure about timeline of what was first, HPET or break if timer caused by dynamic frequencies...
I tried it with my 3700X/B450 system and it didn't work. By that I mean quiescent CPU voltage and core boosting was the same, with the CPU 'eagerly' using base clocks on all cores until I move the mouse.

What's more, when I went to change it I found that it had already had the HPET timer disabled and Windows was using the I-TSC timer. I don't know if default Windows install is to force enable the HPET timer, but I'd never done it.
 

DimkaTsv

Commendable
Nov 7, 2021
171
25
1,640
I don't know if default Windows install is to force enable the HPET timer, but I'd never done it.
Yeah, i actually don't remember it myself too, Maybe it does have it disabled by default, but better check that, than just be surprised by voltages.
But for people that may have questions, this forum have surprisingly good Google indexation.
 

DimkaTsv

Commendable
Nov 7, 2021
171
25
1,640
Hmm... Idk what have i done while optimizing config, but i managed to put idle voltages without Windows HPET even lower over a LONG period of time.
And that's given that i actually use PC in background with few programs, so my C0 state is higher, C1 is MUCH higher and C6 is MUCH lower.
Soo... Windows HPET voltage may not be just some dummy load shenanigans. But it may be that with 14.33 mHz freq timers somehow aligning to show more peak voltages (but it is absolutely consistent somehow then)?
PzzmGZX.png