A Timely Re-Discovery

Most users have no need to worry about the internals of a computer: point, click, run, play games, and spend money if they want something faster. However one of the important features in a system relates to how they measure time. A modern system relies on a series of both hardware and software timers, both internal and external, in order to maintain a linear relation between requests, commands, execution, and interrupts.

The timers have different users, such as following instructions, maintaining video coherency, tracking real time, or managing the flow of data. Timers can (but not always) use external references to ensure their own consistency – damage, unexpected behavior, and even thermal environments can cause timers to lose their accuracy.

Timers are highly relevant for benchmarking. Most benchmark results are a measure of work performed per unit time, or in a given time. This means that both the numerator and the denominator need to be accurate: the system has to be able to measure what amount of work has been processed, and how long it took to do it in. Ideally there is no uncertainty in either of those values, giving an accurate result.

With the advent of Windows 8, between Intel and Microsoft, the way that the timers were used in the OS were changed. Windows 8 had the mantra that it had to ‘support all devices’, all the way from the high-cost systems down to the embedded platforms. Most of these platforms use what is called an RTC, a ‘real time clock’, to maintain the real-world time – this is typically a hardware circuit found in almost all devices that need to keep track of time and the processing of data. However, compared to previous versions of Windows, Microsoft changed the way it uses timers, such that it was compatible with systems that did not have a hardware-based RTC, such as low-cost and embedded devices. The RTC was an extra cost that could be saved if the software was built to do so.

Ultimately, any benchmark software in play has to probe the OS to determine the current time during the benchmark to then at the end give an accurate result. However the concept of time, without an external verifying source, is an arbitrarily defined constant – without external synchronization, there is no guarantee that ‘one second’ on the system equals ‘one second’ in the real world. For the most part, all of us rely on the reporting from the OS and the hardware that this equality is true, and there are a lot of hardware/software engineers ensuring that this is the case.

However, back in 2013, it was discovered that it was fairly easy to 'distort time' on a Windows 8 machine. After loading into the operating system, any adjustment in the base frequency of the processor, which is usually 100 MHz, can cause the ‘system time’ to desynchronise with ‘real time’. This was a serious issue in the extreme overclocking community, where world records require the best system tuning: when comparing two systems at the same frequency but with different base clock adjustments, up to a 7% difference in results were observed when there should have been a sub-1% difference. This was down to how Windows was managing its timers, and was observed on most modern systems.

For home users, most would suspect that this is not an issue. Most users tend not to adjust the base frequencies of their systems manually. For the most part that is true. However, as shown in some of our motherboard testing over the years, frequency response due to default BIOS settings can provide an observable clock drift around a specified value, something which can be exacerbated by the thermal performance. Having a system with observable clock drift, and subsequent timing drift, is not a good thing. It relies on the accuracy and quality of the motherboard components, as well as the state of the firmware. This issue has formally been classified as ‘RTC Bias’.

The extreme overclocking community, after analysing the issue, found a solution: forcing the High Performance Event Timer, known as HPET, found in the chipset. Some of our readers will have heard of HPET before, however our analysis is more interesting than it first appears.

Why A PC Has Multiple Timers

Aside from the RTC, a modern system makes use of many timers. All modern x86 processors have a Time Stamp Counter (TSC) for example, that counts the number of cycles from a given core, which was seen back in the day as a high-resolution, low-overhead way to get CPU timing information. There is also a Query Performance Counter (QPC), a Windows implementation that relies on the processor performance metrics to get a better resolution version of the TSC, which was developed in the advent of multi-core systems where the TSC was not applicable. There is also a timer function provided by the Advanced Configuration and Power Interface (ACPI), which is typically used for power management (which means turbo related functionality). Legacy timing methodologies, such as the Programmable Interval Timer (PIT), are also in use on modern systems. Along with the High Performance Event Timer, depending on the system in play, these timers will run at different frequencies.


Ryzen 7 2700X with HPET Off
ASUS ROG Crosshair VII Hero

Core i7-8700K with HPET Off
ASRock Z370 Gaming i7

Core i7-6950X with HPET On
ASUS X99-E-10G

Core i7-6700K with HPET Off
GIGABYTE X170-Extreme ECC

Core i5-5200U with HPET Off
GIGABYTE BRIX

Core i7-3960X with HPET Off
EVGA X79 SLI

The timers will be used for different parts of the system as described above. Generally, the high performance timers are the ones used for work that is more time sensitive, such as video streaming and playback. HPET, for example, was previously referred to by its old name, the Multimedia Timer. HPET is also the preferred timer for a number of monitoring and overclocking tools, which becomes important in a bit.

With the HPET timer being at least 10 MHz as per the specification, any code that requires it is likely to be more in sync with the real-world time (the ‘one-second in the machine’ actually equals ‘one-second in reality’) than using any other timer.

In a standard Windows installation, the operating system has access to all the timers available. The software used above is a custom tool developed to show if a system has any of those four timers (but the system can have more). For the most part, depending on the software instructions in play, the operating system will determine which timer is to be used – from a software perspective, it is fundamentally difficult to determine which timers will be available, so the software is often timer agnostic. There is not much of a way to force an algorithm to use one timer or another without invoking specific hardware or instructions that rely on a given timer, although the timers can be probed in software like the tool above.

HPET is slightly different, in that it can be forced to be the only timer. This is a two stage process:

The first stage is that it needs to be enabled in the BIOS. Depending on the motherboard and the chipset, there may or may not be an option for this. The options are usually for enable/disable, however this is not a simple on/off switch. When disabled, HPET is truly disabled. However, when enabled, this only means that the HPET is added to the pool of potential timers that the OS can use.

The second stage is in the operating system. In order to force HPET as the only timer to be used for the OS, it has to be explicitly mentioned in the system Boot Configuration Data (BCD). In standard operation, HPET is not in the BCD, so it remains in the pool of timers for the OS to use. However, for software to guarantee that the HPET is the only timer running, the software will typically request to make a change and make an accompanying system reboot to ensure the software works as planned. Ever wondered why some overclocking software requests a reboot *before* starting the overclock? One of the reasons is sometimes to force HPET to be enabled.

This leads to four potential configuration implementations:

  1. BIOS enabled, OS default: HPET is in list of potential timers
  2. BIOS enabled, OS forced: HPET is used in all situations
  3. BIOS disabled, OS default: HPET is not available
  4. BIOS disabled, OS forced: HPET is not available

Again, for extreme overclockers relying on benchmark results to be equal on Windows 8/10, HPET has to be forced to ensure benchmark consistency. Without it, the results are invalid.

The Effect of a High Performance Timer

With a high performance timer, the system is able to accurately determine clock speeds for monitoring software, or video streaming processing to ensure everything hits in the right order for audio and video. It can also come into play when gaming, especially when overclocking, ensuring data and frames are delivered in an orderly fashion, and has been shown to reduce stutter on overclocked systems. And perhaps most importantly, it avoids any timing issues caused by clock drift.

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.

An Audit after our Ryzen 2000-series Review AMD and Intel Have Different HPET Guidance
Comments Locked

242 Comments

View All Comments

  • eek2121 - Sunday, April 29, 2018 - link

    Steam benchmarks are meaningless unless you can filter based on several factors. OEM vs Custom builds, country, etc. That is why I consider anybody that brings up steam survey users to not know what they are talking about. The US has around 300 million people in the world, we spend the highest amount on PC hardware in the world, yet China has billions of people, and they spend the least. Steam groups everyone together. Second, OEM systems force HPET to on. I just checked my laptop running an i7 mobile 6700HK or whatever, and HPET was on in both the BIOS as well as in Windows. So no, you can't make assumptions. Custom builders typically have HPET off, and OEM builders has HPET on. If I were AT, I'd force HPET on. Not to screw one company over vs another, but to force them to improve their HPET implmentations.
  • Sancus - Wednesday, April 25, 2018 - link

    Yeah benchmarking CPUs exclusively with via GPU bottlenecked tests is a great idea.
  • IndianaKrom - Wednesday, April 25, 2018 - link

    One does have to question the usefulness of a 4k benchmark in a CPU review, other than "yep, its still GPU limited". Whole bunch of graphs showing +/- 3%, content to pad the ads with I guess...
  • GreenReaper - Friday, April 27, 2018 - link

    I imagine the intent is to let people who want to be 4K gamers right know that it doesn't matter what CPU they get. Or just to find interesting anomolies. You don't know what you don't test.
  • RafaelHerschel - Wednesday, April 25, 2018 - link

    This makes no sense. I use a GTX 1070 and game on 1080p, let's forget about the reasons why for now, I'm not alone in this. Most gamers, even most of those with slightly above average cards use 1080p monitors. HPET is not an issue, very few people force HPET on. There is a reason only AnandTech got these numbers.
  • SkyBill40 - Friday, April 27, 2018 - link

    I'm in a similar situation but with a 1080. I'm playing at 1920*1200 @ 60Hz only because I've got other financial priorities keeping me from buying a new monitor.
  • eek2121 - Sunday, April 29, 2018 - link

    You are also alone. You cannot rely on steam survey numbers to claim supremacy, as I mentioned in an earlier comment, a steam survey can be nothing more than a dell machine with a GTX 1070 running 1080p, or it can be a Threadripper machine running dual 1080tis @ 1080p. In my situation, I game at 1440p on a 1950x and a 1080ti running 1440p. HPET off. does that make me a minority? No it does not. There is no way to measure per capita spending on PC hardware due to the second hand market, and different demands in different countries. My thought is to force HPET on for all, and may the best company win....just like with Anti Aliasing in gaming.
  • Peter2k - Wednesday, April 25, 2018 - link

    As for the last question

    Maybe it should be made clear if its on/forced on and so forth

    This is anecdotal

    But my testing has shown in a handful of games that HPET is detrimental to gaming (7600K at 5.2Ghz)

    Fps where the same, but HPET introduced a stutter the whole time

    Now I also could've sworn HPET was default off in the UEFI on my Z170

    Maybe that's something to look into as well
    How is HPET set at default in the UEFI
    If its default on with Z370 then it should be made clear it's on
    Its default off for older/newer chips it should be made clear me thinks
  • GreenReaper - Friday, April 27, 2018 - link

    The default would be for it to be enabled, since it is a standard feature of the platform nowadays. However, forcing it to be used instead of the CPU's TSC (when it is also available) is not standard in most modern operating systems where the TSC is known to be reliable, or can be made so.
  • eek2121 - Sunday, April 29, 2018 - link

    A stutter is a defect. I favor neither Intel nor AMD in this case, however IMHO there can be only 2 outcomes: a) Intel fixes it's HPET implementation or b) Microsoft removes HPET altogether. Only then will we receive the true numbers.

Log in

Don't have an account? Sign up now