Forcing HPET On, Plus Spectre and Meltdown Patches

Based on my extreme overclocking roots back in the day, my automated benchmark scripts for the past year or so have forced HPET through the OS. Given that AMD’s guidance is now that it doesn’t matter for performance, and Intel hasn’t even mentioned the issue relating to a CPU review, having HPET enabled was the immediate way to ensure that every benchmark result was consistent, and would not be interfered with by clock drift on special motherboard manufacturer in-OS tweaks. This was a fundamental part of my overclocking roots – if I want to test a CPU, I want to make certainly sure that the motherboard is not causing any issues. It really gets up my nose when after a series of CPU testing, it turns out that the motherboard had an issue – keeping HPET on was designed to stop any timing issues should they arise.

From our results over that time, if HPET was having any effect, it was unnoticed: our results were broadly similar to others, and each of the products fell in line with where they were expected. Over the several review cycles we had, there were a couple of issues that cropped up that we couldn’t explain, such as our Skylake-X gaming numbers that were low, or the first batch of Ryzen gaming tests, where the data was thrown out for being obviously wrong however we never managed to narrow down the issue.

Enter our Ryzen 2000 series numbers in the review last week, and what had changed was the order of results. The way that forcing HPET was affecting results was seemingly adjusted when we bundle in the Spectre and Meltdown patches that also come with their own performance decrease on some systems. Pulling one set of results down further than expected started some alarm bells and needed closer examination.

HPET, by the way it is invoked, is programmed by a memory mapped IO window through the ACPI into the circuit found on the chipset. Accessing it is very much an IO command, and one of the types of commands that fall under the realm of those affected by the Spectre and Meltdown patches. This would imply that any software that required HPET access (or all timing software if HPET is forced) would have the performance reduced even further when these patches are applied, further compounding the issue.

It Affects AMD and Intel Differently: Productivity

So far we have done some quick initial re-testing on the two key processors in this debate, the Ryzen 7 2700X and Intel Core i7-8700K. These are the two most talked about processors at this time, due to the fact that they are closely matched in performance and price, with each one having benefits in certain areas over the other. For our new tests, we have enabled the Spectre/Meltdown patches on both systems – HPET is ‘on’ in the BIOS, but left as ‘default’ in the operating system.

For our productivity tests, on the Intel system, there was an overall +3.3% gain when un-forcing HPET in the OS:

The biggest gains here were in the web tests, a couple of the renderers, WinRAR (memory bound), and PCMark 10. Everything else was pretty much identical. Our compile tests gave us three very odd consecutive numbers, so we are looking at those results separately.

On the AMD system, the productivity tests difference was an overall +0.3% gain when un-forcing HPET in the OS:

This is a lower gain, with the biggest rise coming from PCMark10’s video conference test to the tune of +16%. The compile test results were identical, and a lot of tests were with 1-2%.

If Affects AMD and Intel Differently: Gaming

The bigger changes happen with the gaming results, which is the reason why we embarked on this audit to decipher our initial results. Games rely on timers to ensure data and pacing and tick rates are all sufficient for frames to be delivered in the correct manner – the balance here is between waiting on timers to make sure everything is correct, or merely processing the data and hoping it comes out in more or less the right order: having too fine a control might cause performance delays. In fact, this is what we observe.

With our GTX 1080 and AMD’s Ryzen 7 2700X, we saw minor gains across the board, however it was clear that 1080p was the main beneficiary over 4K. The 10%+ adjustments came in only Civilization 6 and Rise of the Tomb Raider.

Including the 99th percentile data, removing HPET gave an overall boost of around 4%, however the most gains were limited to specific titles at the smaller resolutions, which would be important for any user relying on fast frame rates at lower resolutions.

The Intel side of the equation is where it gets particularly messy. We rechecked these results several times, but the data was quite clear.

As with the AMD results, the biggest beneficiaries of disabling HPET were the 1080p tests. Civilization 6 and Rise of the Tomb Raider had substantial performance boosts (also in 4K testing), with Grand Theft Auto observing an additional +27%. By comparison, Shadow of Morder was ‘only’ +6%.

Given that the difference between the two sets of data is related to the timer, one could postulate that the more granular the timer, the more the effect it can have: on both of our systems, the QPC timer is set for 3.61 MHz as a baseline, but the HPET frequencies are quite different. The AMD system has a HPET timer at 14.32 MHz (~4x), while the Intel system has a HPET timer at 24.00 MHz (~6.6x). It is clear that the higher granularity of the Intel timer is causing substantially more pipeline delays – moving from a tick-to-tick delay of 277 nanoseconds to 70 nanoseconds to 41.7 nanoseconds is crossing the boundary from being slower than a CPU-to-DRAM access to almost encroaching on a CPU-to-L3 cache access, which could be one of the reasons for the results we are seeing, along with the nature of how the HPET timer works.

There is also another aspect to gaming that does not appear with standard CPU tests: depending on how the engine is programmed, some game developers like to keep track of a lot of the functions in flight in order to either adjust features on the fly, or for internal metrics. For anyone that has worked extensively on a debug mode and had to churn through the output, it is basically this. If a title had shipped with a number of those internal metrics still running in the background, this is exactly the sort of issue that having HPET enabled could stumble upon - if there is a timing mismatch (based on the way HPET works) and delays are introduced due to these mismatches, it could easily slow down the system and reduce the frame rate.

AMD and Intel Have Different HPET Guidance Why This Matters
Comments Locked

242 Comments

View All Comments

  • ConstructionKing - Saturday, April 28, 2018 - link

    Get ready to grab the best Flooring services in Ernakulam . We provide all the services of flooring including floor tile supply, professional flooring works etc at reasonable price. http://www.inframall.net/flooring.php
  • ConstructionKing - Saturday, April 28, 2018 - link

    Inframall undertakes all the roofing works including roofing sheet supply, roofing tiles supply, repair works and all other roofing related construction works at lowest rate.http://www.inframall.net/roofing.php
  • ConstructionKing - Saturday, April 28, 2018 - link

    Get experienced professionals from Kochi, Ernakulam and near locations to complete your plumbing requirements including man power and material supply. Click Details : http://www.inframall.net/plumbing.php
  • ConstructionKing - Saturday, April 28, 2018 - link

    Grab the best offers on electrical construction services. We carry professional electrical fitting services and fitting items at lower cost. Complete details @ http://www.inframall.net/electrical.php
  • ConstructionKing - Saturday, April 28, 2018 - link

    We Inframall do all the Repair And Maintenance Services for building and maintenance home constructions. Visit our website http://www.inframall.net/repair-maintenance.php to learn more.
  • ConstructionKing - Saturday, April 28, 2018 - link

    Find and choose the top best interior designers and architects for your home or commercial building constructions from our certified associate platform. We undertake all interior works at minimum rate in Ernakulam. http://www.inframall.net/interior-design.php
  • ConstructionKing - Saturday, April 28, 2018 - link

    Inframall in Ernakulam undertake all the painting works including material supply and man power. We aggregates all the professionals and material suppliers under single roof and makes the customers easy to completes their construction works.http://www.inframall.net/painting.php
  • lyeoh - Saturday, April 28, 2018 - link

    After so many decades and with so many transistors available can't Intel/AMD add better more efficient and accurate ways of getting time (e.g. monotonic time and also "real time")? They keep adding YetAnotherSIMD but how about stuff like this? For bonus points add efficient easy ways to set (and cancel) interrupts that will trigger after certain times.
  • patrickjp93 - Monday, April 30, 2018 - link

    It's a total misconception that any circuit can get these times more accurately and efficiently at the same time. There's no demand for it on a broad scale either.
  • Bensam123 - Saturday, April 28, 2018 - link

    This has been something the gaming community has known about and discussed for years, you can find posts about HPET all over popular forums. However, they aren't backed by any sort of meaningful data and much like with core parking and vpns for gaming, legitimate hardware testing websites generally have either turned up their nose at it or disregarded them as complete snake oil.

    I'm glad HPET is finally getting looked at in real depth. What was discussed here was just their real effect on quantifiable metrics, such as benchmarks, but what gamers discuss is their impact on stuttering or microstutters as well as hit registration in netcode (which is extremely dependent on timing). That wasn't looked at at all here. While this discussion was mainly focused on the difference between results between other websites and Intel vs AMD, I think that's not quite the right way to approach this. Rather it should be looked at the effect of timers in general on gaming as a whole.

    The statement that you guys received from Intel pretty much makes it blatantly clear that no one really had any idea what was going on with the timers over there or that they really had a big impact on anything outside of synthetic results. Microsoft has just put band aids on top of band aids to keep everything running and it got to the point where it's no longer transparent to people who are buying hardware, people who are making hardware, or people who are developing software (beyond a few very niche groups) how they all interlock and intermingle with each other. I didn't until I did some digging and required even more to learn there were more timers besides HPET between multiple and sometimes vaguely related forum posts.

    A higher resolution timer should be good, especially for video games, but the impact it has on the system because of it's crude and backwards implementation has made it such that it's basically just a synthetic cog that can't be used in practice. It makes you wish there was a solution that just put everything on the same page, hardware and software. I'm sure game developers who just lease a engine and then essentially make a mod have no idea what's going on here and developers who actually make the engine (Dice, Epic, Crytek) may not even know there is a problem in the first place.

    I do hope Anand takes this a bit further with frame time benchmarks and maybe FCAT designed to look specifically at this. As was mentioned in this article, implementations even seem different across different motherboards, which is a very, very bad thing and should also be looked at. There is a lot of room for future articles here focused around this specific issue until there is some remote amount of standardization.

    If you're looking for more interesting things to test - almost no one tests net code in video games, with the handful of people who do making arbitrary comparisons and really having no tools or benchmarks to work with, even though video games (especially highly competitive ones) are extremely dependent on such things, especially when you get into the top 10% of the player base. People just assume gaming code 'works' and that magical part of games are all created equal when it couldn't be any further from the truth. Net code is literally trying to hold together what is essentially a train wreck while trying to mask it from it's users as best as possible. Some games do it a lot better then others.

Log in

Don't have an account? Sign up now