• 🏆 Texturing Contest #33 is OPEN! Contestants must re-texture a SD unit model found in-game (Warcraft 3 Classic), recreating the unit into a peaceful NPC version. 🔗Click here to enter!
  • It's time for the first HD Modeling Contest of 2024. Join the theme discussion for Hive's HD Modeling Contest #6! Click here to post your idea!

I would like to learn more about "HPET".

Status
Not open for further replies.
Level 1
Joined
Apr 13, 2020
Messages
2
I'd like to give a heartfelt welcome to all gamers and visitors alike. I wish you all the best of health. The reason for this has to do with video games. That is, I'd like to learn more about "HPET" and why it needs to be turned off in order to play games. It perplexes me a lot. Do you have any suggestions?
 
Level 1
Joined
Apr 13, 2020
Messages
2
So, guys. Today I did a Google search and found this article. There is more information that is mentioned. I hope it will also help others like me.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
I have never heard of the High Precision Even Timer needing to be turned off to play games. That said it seems that it is not used much anymore due to deprecation and inefficiency. Wikipedia mentions a few reasons why which I will quote below.

a VMware document also lists some other drawbacks: "The specification does not require the timer to be particularly fine grained, to have low drift, or to be fast to read. Some typical implementations run the counter at about 18 MHz and require about the same amount of time (1–2 μs) to read the HPET as with the ACPI timer. Implementations have been observed in which the period register is off by 800 parts per million or more."
The documentation of Red Hat MRG version 2 states that TSC is the preferred clock source due to its much lower overhead, but it uses HPET as a fallback. A benchmark in that environment for 10 million event counts found that TSC took about 0.6 seconds, HPET took slightly over 12 seconds, and ACPI Power Management Timer took around 24 seconds.
In 2019 it was decided to blacklist HPET in newer Linux kernels when running on some Intel CPUs (Coffee Lake) because of its instability.

 
Level 19
Joined
Jan 3, 2022
Messages
320
What he refers to is: The HPET bug: What it is and what it isn't
But wait, there's more! A Timely Discovery: Examining Our AMD 2nd Gen Ryzen Results
And even more The slow currentTimeMillis()
Still if you wanted to learn more about it: Acquiring high-resolution time stamps - Win32 apps

The issue there was WINDOWS. In a Windows 10 update, HPET became the default. HPET stands for High Precision Event Timer. It should only be used when your program requires that high precision. Precisely because it's High Precision - it is slow.
Multiple clock sources. To look up the current time in real life you can look at a wall clock or check a TV news channel. Precise? No, but you rarely need exact seconds. If you really wanted a precise time, you would go to the nearest atomic clock and see the seconds ticking there. Yes it's very slow (to drive there), but you would get <1ms precision.
Your computer also has multiple clock sources. For most applications the old "imprecise" internal clocks can be used. However Microsoft developers decided to always use the slow yet precise HPET to return current time. The result? Overall slowdown, because current time is a frequently used function everywhere. If you slow down something that's used frequently, you'll have lower performance.

I think the issue has been fixed since.
PS: If you use MSSQL Server, you don't want HPET for performance.
 

Dr Super Good

Spell Reviewer
Level 63
Joined
Jan 18, 2005
Messages
27,197
Note that the issue with turning HPET off is that the computer's timing accuracy is reduced. As such trying to measure time becomes more skewed which can reduce the reliability of results. If the skew is significant given the time frames involved is another question...
 
Status
Not open for further replies.
Top