HPET: Or how microstuttering could be eliminated

Discussion in 'General Discussion' started by Nitrometh, May 19, 2015.

  1. Nitrometh

    Nitrometh Registered

    Joined:
    Dec 28, 2014
    Messages:
    1,080
    Likes Received:
    443
    Hey guys!

    A day ago I read about HPET in a post from Tosch. I´m not really a computer crack...but let my try to explain:

    HPET is a high precision event timer. I think all or most of your computers should support it.

    To enable HPET you should first enable it in your BIOS. It also must be activated in your OS. And thats the point.


    On my PC HPET was enabled in the BIOS, but disabeled in my OS. The result are two different timers with two different "speeds" which must be synced. That caused the microstuttering despite of constant 60 FPS in rF2 for me since the very first build.


    How to enable HPET:

    1. Start your Computer and enter the BIOS (ASUS Board it should be the "DEL"/"ENTF"-key.)

    2. Now you must search the HPET-function
    If you have also a ASUS board, you must enter the ADVANCED MODE by pressing "F7". Now you will find "PCH-Config".
    Enter PCH-Config and enabe HPET. (I guess it´s the only option to enable/disable there!)

    3. After you have enabeled HPET, you must save the settings and reboot your PC!

    4. Now you have to start the commander as admin. (type in "cmd", then right click and "run as admin")

    5. To enable HPET as the only timer run the command bcdedit /set useplatformclock true

    6. If you have typed in the command correctly, you will get a message in the cmd window (also if you make a mistake ;) )

    7. Now restart your Computer and go racing!


    Note:
    I don´t know if this option is able to help everyone. In my case the microstuttering (despite constant 60 FPS) is gone. rF2 is running smooth now! It feels like a new game!;)

    Note 2: To disable HPET in Windows run the command bcdedit /deletevalue useplatformclock and disable it in your BIOS

    Hopefully you guys who suffers from microstuttering get the same positive effect! :)

    If you can´t find HPET in your BIOS, please read your bios manual! ;)
     
  2. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    I typically don't have micro stutters other than maybe a few single stutters over that span of 30mins. But I figured I would give this a shot anyways. HPET was already enabled in my bios but the flag wasn't set in the loader so I added that. I did a short 30min test and haven't seen a single stutter so far. When I have more time I will so some back to back tests to see for sure if it helps.

    A better test would be for someone who actually suffers from stutters to give it a shot.
     
  3. Justy

    Justy Registered

    Joined:
    Oct 26, 2013
    Messages:
    516
    Likes Received:
    4
    Interesting post, thanks for the tip. I will try this tonight.

    Sent from my GT-I9305 using Tapatalk
     
  4. kimikaze

    kimikaze Registered

    Joined:
    Feb 17, 2011
    Messages:
    650
    Likes Received:
    23
    http://en.wikipedia.org/wiki/High_Precision_Event_Timer

    It is a bit of hit or miss. Some reports about improve responsiveness other about slow downs(like slower Windows and other software start up). I guess it depending most on hardware setup. In my case, i don't see any major differences, although i think(or i imaging this :)) i can se improvement in loading of youtube videos. Like youtube buffer is loading faster. In any case is worth trying as is simple and you can't do harm to your windows installation and you can always convert back to previous state.
     
    Last edited by a moderator: May 19, 2015
  5. Nitrometh

    Nitrometh Registered

    Joined:
    Dec 28, 2014
    Messages:
    1,080
    Likes Received:
    443
    Jep. I think the most important thong is that you activate or disable hpet in both. BIOS and OS. If you run 2 different timers this could cause the stuttering. All in all it's worth to try. For me, I've got a brand new rf2:D
     
  6. Noel Hibbard

    Noel Hibbard Registered

    Joined:
    Oct 5, 2010
    Messages:
    2,744
    Likes Received:
    40
    Well as I said above I had very rare stutters on my system even though HPET was enabled in my bios but disabled in the OS. Maybe it just varies a lot form system to system. The good thing is it's VERY simple to enable/disable in the bios and in the OS. So it's totally worth a shot.

    I will definitively do some more back to back testing of this over the weekend. I read around on some other gaming forums of people having stability problems with using HPET. I would rather have a single stutter or two every 30mins vs a total crash every few hours. It may be a good idea to let a bunch of AI run around the track for several hours to test the stability with HPEC before committing to an official race with it.
     
  7. kimikaze

    kimikaze Registered

    Joined:
    Feb 17, 2011
    Messages:
    650
    Likes Received:
    23
    Well there is a reason that Microsoft don't enabling this feature by default. Maybe was first meant to become some sort of standard, but Hardware and(or) software companies refused to commit to it? I don't know, but there is a reason for sure.
     
    Last edited by a moderator: May 20, 2015
  8. DurgeDriven

    DurgeDriven Banned

    Joined:
    Mar 20, 2012
    Messages:
    6,320
    Likes Received:
    43
    +1

    My sims are always baby bum smooth.

    The last time I got stutter is running DRS 4x lol
     
  9. Nitrometh

    Nitrometh Registered

    Joined:
    Dec 28, 2014
    Messages:
    1,080
    Likes Received:
    443
    Wow. I just need to put 30 ai on the Track and watch the replay and my gtx 680 starts to die.
     
  10. DurgeDriven

    DurgeDriven Banned

    Joined:
    Mar 20, 2012
    Messages:
    6,320
    Likes Received:
    43
    Oh yeah that as well, too many cars will do it. ;)
     
  11. Nitrometh

    Nitrometh Registered

    Joined:
    Dec 28, 2014
    Messages:
    1,080
    Likes Received:
    443
    After a looong test and two square shaped eyes, I can confirm the stability on my system. Other programs run smooth. No slowdowns etc
     
  12. fohdeesha

    fohdeesha Registered

    Joined:
    Dec 20, 2014
    Messages:
    100
    Likes Received:
    6
    Forcing windows to use only HPET being a good thing has been debunked, there's a reason it's not set that way by default. All the microstuttering fixes reported by forcing HPET as a system timer turned out to be placebo and could never be backed up by numbers. If you check your DPC latency, the most popular cause of micro stuttering and other issues, you'll see it will have gone UP significantly after forcing the use of HPET. The option to force it as the only system clock is only there for multi-box server/distributed computing environments when you want a number of systems all on one high resolution clock. The tradeoff is a slight increase in DPC latency and a few other things, which is BAD for gaming and normal system use. This is an easy tool to check your DPC latencies before and after adjusting this setting - http://www.thesycon.de/deu/latency_check.shtml

    Here's an article with pretty conclusive testing - https://tweakhound.com/2014/01/30/timer-tweaks-benchmarked/

    The only way forcing the use of HPET instead of TSC would improve gaming performance and decrease DPC latency would be if your systems bios/UEFI has known bugs relating to the TSC timer, which is incredibly rare

    From an engineer -

    "FWIW, I wanted to provide some additional insight as I’ve been involved with this since 2008 R2 when the Stamp Counter (TSC)was (Re)-introduced to Windows. The PlatformClock parameter / tweak is not meant to “improve” performance per say, it’s meant for stability and compatibility purposes which can (and will) improve performance over use of the TSC when enabled on / within the correct (Server) configuration environment.

    You may recall that traditionally Windows (as do most x86 based OSs) function on the assumption / use of a Single Clock Domain for a given server, however with the ability of servers to be physically “scaled” (connected together) to create a larger “multinode” server (IE – 2, 3, 4, 5, 6, 7 or 8 node), we have a problem where each server has it’s own local “clock”. This creates a “multi-clock” domain which in and of itself is not bad, however, the “clocks” are Not synchronized across all nodes (unless Hardware clock synchronization is implemented which is very difficult/involved to implement) therefore there can be clock skew / drift between nodes & processors (other than Node 0) which can lead to thread scheduling and timing issues which at minimum can lead to performance problems in addition to other strange & bizarre behavior (poor network & disk performance, hang conditions, etc. etc. etc.).

    The problem is encountered within a multi-clock domain beginning in 2008 R2 when the TSC was re-introduced as the default Clock (as mentioned above) Vs the use of the HPET (or Power Management (ACPI / PMclock)) Clock that prior OS versions used. The TSC is very fast and reliable but in using the TSC as the default Source Clock, the OS assumes a Single clock source. Depending upon which node the RDTSC thread executes, clock synchronization may / can become skewed resulting in thread scheduling problems and issues such as is mentioned above.

    This said, to alleviate this potential problem on some older servers and certain multi-node scalable server platforms, “bcdedit /set useplatformclock true” should be implemented to circumvent these potential problems.

    In general, TSC is much faster for the OS and Apps to utilize than the other methods which should provide better overall performance by avoiding additional latencies due to additional overhead of the other clock counter methods. In short, the TSC provides the lowest overhead which can and does translate to lower overhead / latency generally resulting in better performance and therefore the use of the TSC for Windows 2008 R2 (Windows 7) and later should remain as the default clock source unless known issues or problems are encountered."
     
    Last edited by a moderator: May 20, 2015
  13. K Szczech

    K Szczech Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,720
    Likes Received:
    45
    Guys - take it easy! The real reason for these stutters is not some timer in your computer.

    I could give you a lecture on multithreading, graphics driver optimizations, FFB frequency, steering wheel drivers, GPU-CPU synchronization, GPU command queue and a few other subjects that add to the mix... but after spending hours on such post it would be forgotten after a few months and another guy would come and say he has found some article on the net about some bios setting :)

    It's really not up to timers. If it was the timer fault, you would be experiencing such stutters all the time, not just under some circumstances.

    These circumstances are caused by the mix of subjects I've listed above. It's basically caused by your CPU choking up when too many tasks collide and then catching up when it has some room to breathe. This happens fast - over a few frames, so you get one or two frames of slow motion followed by one or two frames of fast forward. This is also why you sometimes experience these in some specific track locations, car-track combos or other specific conditions.

    It's up to game developers to build an engine which manages these aspects in a controllable way (controllable by programmer). Otherwise it will be the other software (graphics driver, operating system) setting the rules and these may not always be in favor of the game engine.


    Also, by changing such settings in your computer you're creating an environment, that game may not be designed for.
    Of course I appreciate the effort, but it may actually cause more harm than good.
     
    Last edited by a moderator: May 20, 2015
  14. Ivan Baldo

    Ivan Baldo Registered

    Joined:
    Oct 7, 2010
    Messages:
    57
    Likes Received:
    3
    Linux first tests the TSC to see if it is synchronized across all CPUs and if it remains constant even when changing CPU frequency, if that fails then it falls back to HPET if it is available.
    So, if Linux and Windows prefer the TSC then there should be a pretty good reason for it...
    Some old CPUs don't have the TSC synchronized between cores, I remember that in Windows XP you had to install a driver from AMD to fix that issue and correct the TSC to be semi accurate, then there was a Windows update fixing it, that was a long time ago....
    So my recommendation for whoever cares is this: install all updates available for your operating system and leave as much as you can at defaults, only change things you really understand or if you are really desperate because of some issue...
    Hope this helps!
     
  15. Satangoss

    Satangoss Registered

    Joined:
    Jun 2, 2011
    Messages:
    1,123
    Likes Received:
    7
    I'm only having stutters in Raceroom - DTM Experience nowadays. Maybe a good test, let's see.

    Edit > Didn't read the technical posts above, but I'm going to test just in case.
     
  16. Tosch

    Tosch Registered

    Joined:
    Oct 5, 2010
    Messages:
    1,872
    Likes Received:
    51
    This HPET thing is not for everyone. If you have no stutter there is no need to "fix" it. Different hardware and software (OS's) give different results. It is just one more option you can try.
    Here is the link to the thread where I've found this information. I recommend to read the whole thread. There are good and bad results.

    http://www.neowin.net/forum/topic/1075781-tweak-enable-hpet-in-bios-and-os-for-better-performance-and-fps/

    If it doesn't work you can go back to default timers.

    btw the "idea" to check the timers came from this.

    http://www.ocaholic.ch/modules/smartsection/item.php?itemid=1071&lang=english
     
    Last edited by a moderator: May 21, 2015

Share This Page