"Christmas - the time to fix the computers of your loved ones" « Lord Wyrm

The HPET bug: What it is and what it isn't

mat 26.04.2018 - 11:30 209224 59 Thread rating
Posts

Lowprofile18

Bloody Newbie
Registered: Mar 2020
Location: USA
Posts: 3
Thank you @mat very informative if more questions arise i'll be sure to post here

Marctraider

Bloody Newbie
Registered: Feb 2020
Location: Nowhere
Posts: 6
New System (heavily tweaked), new results!

https://i.imgur.com/pzLGChh.png

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: nö
Posts: 25423
Sexy. :)

Any tweaks that you want to share?

Marctraider

Bloody Newbie
Registered: Feb 2020
Location: Nowhere
Posts: 6
Well other than the general minimal LTSC and further neutered build, disabled all unnecessary junk, pcie root ports, asmedia and dozens of other options to minimize DPC latency, the major thing that dropped me from 6~ms max frametime spikes to 3ms~ was fooling around with ACPI/HPET Timer and some combination of useplatformclock/tick.

Strangely, achieving that 3~ms max frametime spike in this combination, has a negative effect of totally ruining MouseTester polling rates.

So one thing improves, mouse polling gets worse? How can that be explained :-/
Bearbeitet von Marctraider am 24.04.2020, 16:21

dxzdxz1

Bloody Newbie
Registered: Apr 2020
Location: Brazil
Posts: 2
I'm getting strange results depending on which monitor I use during the test.

I have a 27' 1080p Ultrawide Montior and a 55' 4k TV

On my TV the results are waaaaay diferent comparing to the monitor. On both I ran the test at 1920x1080.

I turned off Freesync on the monitor before the tests.

I made one test for each configuration:
HPET WINDOWS ON + UEFI ON
HPET WINDOWS ON + UEFI OFF
HPET WINDOWS OFF + UEFI OFF
HPET WINDOWS OFF + UEFI ON



I can't attach files here, so I uploaded the tests on zippyshare.

https://www28.zippyshare.com/v/XeGyj6ZS/file.html

Could you look at these results and see what's wrong?

Don't know if this is important, but on the TV my desktop scaling is 250 and on my monitor my desktop scaling is the default - 100.

Other thing you will notice, my GPU utilization at Fullscreen on the TV never gets above 91% and on Windowed varies between 80% to almost 100% depending on HPET ON or OFF.
On the other hand, running the test with my monitor, my GPU utilization is almost 100% in all tests.

I have a i7 3960X + 1070

dxzdxz1

Bloody Newbie
Registered: Apr 2020
Location: Brazil
Posts: 2
Sorry, I sent you the wrong link above.
The right one is this: https://www58.zippyshare.com/v/yOKUPvfG/file.html

falconepl

Bloody Newbie
Registered: May 2020
Location: Polen
Posts: 2
@mat Thanks for the app! TimerBench might be simple, but it's super useful for HPET performance analysis.

Just got one question. Is the Unreal demo used in the app available somewhere? Like the same version with the same camera motion as in the TimerBench, but as an Unreal project. I wanted to debug/profile CPU times in it to figure out what's responsible for that single ~20ms spike that I've got right at the beginning of every frame times analysis (right after the red part).
Bearbeitet von falconepl am 23.05.2020, 23:00 (minor edit)

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: nö
Posts: 25423
Glad you like it!

The 20 ms seem to be part of the preloading. Probably a slower SSD in your system?
The first few seconds are ignored from each run to mitigate this preloading stuttering/slowdowns. A static time will never work out. Next version will add a loading screen for preloading.

Do you still need the Unreal project for the game test? It is available somewhere on the web.

falconepl

Bloody Newbie
Registered: May 2020
Location: Polen
Posts: 2
@mat Yeah, it could be the SSD. It's Samsung EVO, but I kinda suspect that it might have a faulty controller or something, because it also (very, very rarely, but still) freezes the whole system for some time when Steam initializes new game installation.

Yeah, if the demo is available anywhere I will surely take a look at it. I've found a demo scene already, but I wouldn't call it a benchmark, as it's just a "static" sample, without scripted camera motion.

By the way, have you considered open-sourcing TimerBench on GitHub or GitLab?

fanbu

Bloody Newbie
Registered: May 2020
Location: US
Posts: 1
Thank you mat! You really solved a problem that troubled me for 5 years!

My last PC was a Skylake platform laptop and now I'm using Ryzen. They both suffer from this same issue.

And I did your test on my new PC (https://ibb.co/9pQgdFw).

After I turn off HPET, the stuttering disappears. Now everything is nice and smooth.

amymor

Bloody Newbie
Registered: Dec 2020
Location: moon
Posts: 1
Hi mat

I little confused. I saw somebody said you must disable High precision event timer through Device manager. But now sounds like I must disable it through bios and with "bcdedit /set useplatformclock no". Which one is best method? Should I use all of them?(I mean What figure should my test be?)

Another question: Any idea about "bcdedit /set disabledynamictick yes" and "bcdedit /set useplatformtick yes"? Should I disable them or not (which gives me better performance)?

Thanks
Sry for my bad eng

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: nö
Posts: 25423
You can disable HPET in BIOS (if the option is even there) or use bcdedit /set useplatformclock no. Both leads to the same result: The OS doesn't use HPET for timing anynore.

If you don't disable it in BIOS, you can still use HPET but an application would have to have its own driver implementation to make that happen. So it's there, but really hard to use. My latest project called BenchMate is doing that for example.

bcdedit /set disableddynamictick yes - this will disable the possibility for the kernel to only tick (as in: do some work) when it is really necessary. Instead the OS will process everything 60 times per second, which is basically like it always was before Windows 8 and 10 came around. If you disable dynamic ticks, your system might be a tad bit more responsive but will not be as efficient with power. I doubt that this option is helpful unless there's some sort of bug.

As for the question if you should use HPET or not: Please test it with TimerBench. That's exactly why I made it.

johndough247

Bloody Newbie
Registered: Apr 2021
Location: USA
Posts: 1
Hey,

Suggestion for future version of TimerBench: the ability to adjust the vertical scale of the graphs to make it easier to visually compare frametime spikes. Either a realtime slider or a menu option to scale all graphs to 10, 20, 50, 100, 500 or 1000ms (my preferred option).

I've noticed that even though different tests would have spikes in the same range, the scale of the graphs vary by a lot.

wasaki

Bloody Newbie
Registered: Aug 2021
Location: Dubai
Posts: 5
Thanks for your amazing App , I use TimerBench 1.5 and get some weird issue in both my old 4930k and new 10850k . timer calls is very low around 100,000 only , I tried to disable hpet using your app but still got the same results , Also when enable Hpet I get low fps .

1 time I fix it but still can't remember how ! but when I test timer call was more than 1000,000 so I agree with you there is a bug causing stutter and low fps especially games that use cpu more .

you know how to fix it ?
Thanks

mat

Administrator
Legends never die
Avatar
Registered: Aug 2003
Location: nö
Posts: 25423
Please post a screenshot with the results.

Timer calls in the game test can also be low when there is something else holding the CPU/GPU back.
Kontakt | Unser Forum | Über overclockers.at | Impressum | Datenschutz