Another look at HPET High Precision Event Timer

Discussion in 'Videocards - NVIDIA GeForce Drivers Section' started by Bukkake, Sep 18, 2012.

  1. artina90

    artina90 Member Guru

    Messages:
    106
    Likes Received:
    25
    GPU:
    RTX 2080Ti
    With HPET ON my 7820X gets less than half the fps in TimerBench compared to running it with HPET off or default.
    HPET completely kills gaming performance on X299 systems and I suspect it might get increasingly worse as the core count goes up.
    This is 100% repeatable and the difference is extremely noticeable, well beyond snake oil levels.
    I don't know if Ryzen/6-8 cores non X Intel CPUs behave in the same way but I definitely suggest all X299 users to avoid forcing HPET on.
     
    Xtreme512 and evgenim like this.
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    Since HPET is out of CPU no matter what CPU is in use when you force the HPET ON.
     
  3. SunRedux

    SunRedux Member

    Messages:
    16
    Likes Received:
    0
    GPU:
    GTX 860m / 4 GB
    So what is the deal with the counter being stuck on 10Mhz on the newer Windows versions? My system feels like it's struggling to do anything now.
     
  4. Astyanax

    Astyanax Ancient Guru

    Messages:
    7,705
    Likes Received:
    2,579
    GPU:
    GTX 1080ti
    ignore it, the counter is virtualized now.
     

  5. SunRedux

    SunRedux Member

    Messages:
    16
    Likes Received:
    0
    GPU:
    GTX 860m / 4 GB
    Ah okay, so basically nothing's changed if I don't have HPET turned on, that's good to know. Many thanks!

    Edit : Also made sure to check via Coreinfo.exe from https://live.sysinternals.com/
     
  6. yobooh

    yobooh Master Guru

    Messages:
    254
    Likes Received:
    9
    GPU:
    Gigabyte 970 G1 @1500mhz
    I too feels HPET off makes things more responsive in games.
    My question it's why RTTS still suggest to leave it on for perfect VSYNC?
     
    Last edited: Aug 5, 2019
  7. Astyanax

    Astyanax Ancient Guru

    Messages:
    7,705
    Likes Received:
    2,579
    GPU:
    GTX 1080ti
    if you set /useplatformclock true, then sure.
    if you leave well enough alone and just have hpet do its own thing, placebo.
     
  8. almightywumbo

    almightywumbo New Member

    Messages:
    1
    Likes Received:
    1
    GPU:
    EVGA RTX 2060 6GB
    From BlurBuster's themselves: "Most systems already have high precision clocks (HPET, TSC, etc). However, if you intentionally manually disabled this setting in your BIOS, turn it back on. High-precision clocks are needed for microsecond-accurate stutter-free frame rate capping."
    https://www.blurbusters.com/howto-low-lag-vsync-on/

    I'm also a little skeptical of this. Do you think this applies to all G-Sync users as well?

    I really wish BB would investigate HPET because it's generally understood that HPET on can increase input lag (I can attest to this on my rig as well) but there isn't a lot of good information online about it. Especially with Windows 10 supposedly using a software clock.
     
    Last edited: Aug 10, 2019
    yobooh likes this.
  9. Kulagin

    Kulagin Member

    Messages:
    47
    Likes Received:
    3
    GPU:
    R9 280X
    There is actually:
    https://www.overclockers.at/articles/the-hpet-bug-what-it-is-and-what-it-isnt
    Also this:


    That youtube video alone should be enough to never ever use bcdedit /set useplatformclock yes.

    I get same ~50% FPS in games with useplatformclock yes.

    Then on the HPET ON vs OFF in BIOS, useplatformclock and useplatformtick there's this video where dude provides actual evidence with graphs:


    Mouse graphs, interrupt latency stats and FPS in games is more than enough evidence to never use HPET. But FR33THY advises to enable HPET in BIOS, disable it in system and disable synthetic timers to get that exact 0.5ms resolution timer. It would be nice to have tests(mouse graphs, FPS benchmarks, motion to photon latency test) for every configuration:
    HPET in BIOS Enabled/Disabled
    bcdedit /set useplatformclock yes/no
    bcdedit /set useplatformtick yes/no
    bcdedit /set disabledynamictick yes/no

    We can do mouse graph tests with MouseTester, FPS benchmarks with TimerBench and motion to photon latency tests with Arduino and photodiodes. That would be a lot of work to test it all, though.
     
    Last edited: Sep 3, 2019
    Xtreme512 and yobooh like this.
  10. shm0

    shm0 Member

    Messages:
    45
    Likes Received:
    3
    GPU:
    EVGA GTX 1060 SC
    Talking about timers...
    Aren't 60hz, 120Hz, and 144hz actually "bad" refresh rates?
    Resulting in uneven frame times:
    60Hz = 16.66666666666667 ms
    120Hz = 8.333333333333333 ms
    144 Hz = 6.944444444444444 ms
    Maybe causing micro stutter?

    Aren't
    50Hz = 20 ms
    100Hz = 10 ms
    125Hz = 8 ms
    better choices?
     

  11. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    You are talking about refresh rates of display.
     
  12. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    Last edited: Sep 4, 2019
  13. shm0

    shm0 Member

    Messages:
    45
    Likes Received:
    3
    GPU:
    EVGA GTX 1060 SC
    Maybe you can explain to me how this works?
    How often does a GPU generate an interrupt?
    Every time a frame is generated/outputted to display?
    Do the occur synchronously with the kernel tick or asynchronously with the kernel tick?
    Assuming the kernel ticks every 1ms. How to sync that with a frame time of 16.66666666666667ms.
    And an uneven frame time of 16.66666666666667, for example, can never produce a stable 60Hz output.
    Because the precision of floating-point is too limited here. Or I'm mistaken?
    I guess that is why, even when your system is powerful enough, fps occasionally dip to 59, because of desync.
    I always wondered why some game devs choose server ticks like 66 ticks a second...
    Then wonder why the hit reg is bad. But that is even more off topic....
     
    Last edited: Sep 4, 2019
  14. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    Kernel tick is a system timer interrupt (generated by real time clock or some other timer) which takes place once per interval of 15.6 milliseconds by default (and interval can be decreased to 0.5 milliseconds). That interval is called "system timer resolution" (the bigger interval the lesser resolution). System timer interrupt is used by OS kernel to do internal work like scheduling the executing threads. It has nothing to do with the display refresh rate.
    Display`s refresh rate is a capability of display itself - how often it can change (refresh) the picture. Videocard should take that refresh rate of display into account if you turn on so called V-Sync mode - videocard should prepare each new frame according to refresh rate of display to avoid the screen tearing (due to not synced work of videocard and display). Videocard generates interrupt to signal something to CPU (as a result of some work). For example driver asked a videocard to draw new frame, and instead of waiting for the result (stalling the CPU) it just returns to do the next work. And when videocard finishes with sent frame it signals CPU with interrupt - "work is done" (or "failure").

    As for floating point arithmetic, OS kernel operates with system timer in units of "100-nonoseconds" so there are no floating points in calculations at all.
     
    386SX likes this.
  15. shm0

    shm0 Member

    Messages:
    45
    Likes Received:
    3
    GPU:
    EVGA GTX 1060 SC
    So,
    it is Display Refresh Rate -> GPU Interrupt -> Driver @ OS Kernel Tick
    GPU is bound to Refresh Rate, has to display frame each 16.666... ms.
    Driver runs at Kernel tick of 15.6 ms (or at 1ms when multmedia media task is active)

    So if a software whats to use timers to calculate something(like the gpu driver), it is not possible because there are no floating-point calculations?

    16.666.... In theory, has an endless amount of decimal points. Is it possible (as of today) to create software or hardware that is able to do calculations with endless numbers? I don't think so.
    It has to be rounded at some time and when something needs to be rounded there is an inaccuracy.
    This also includes the connection/transfer between the GPU and the display itself.
    .
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    No. GPU can raise interrupt many times withing display refresh interval.
    And driver doesn`t work at kernel ticks. With every tick kernel flicks through every executing thread (even if they do sleep) and decides which thread should be scheduled next. Also with every tick kernel flicks through any software timers (Windows offers timers to fire periodic or single "signal" with specified interval) to "signal" expired ones.

    Software timers utilize intervals set in milliseconds (as integer values). High precision timers - available through a pair of functions QueryPerformaceFrequency and QueryPerformanceCounter - utilize abstract units "ticks" and they only return them when asked for: code can take two values of "ticks", subtract second value from the first one and divide result by frequency and get the interval of time passed between two takes.
     
    386SX likes this.
  17. Krzyslaw

    Krzyslaw Master Guru

    Messages:
    210
    Likes Received:
    57
    GPU:
    MSI GTX1060 6GB
    Hi

    I recently made some testings on my MSI PS63 8RC.
    HPET on in bios disabled in OS plus bcdedit set as per video from @Kulagin

    I have tested different AC Timers 0.5 1 2 3 4 in FireStrike.

    What I have found is:
    0.5 - highest gfx score 1 25.17fps lowest physics 8788
    4 - lowest gfx score 1 24.61 highest physics 8941

    many guys recomend ac 1 but from testings I saw as following gfx score 1 25.09 physics 8833

    What I have found is that ac set at 2 gives a perfect balance with cpu and gpu workloads.
    gfx score 1 25.08 physics 8926 so both cpu and gpu works almost at their best.

    Test were done with cpu at 3.2GHz on all cores max. Unfortunately I didnt have ac adapter with me so test were on battery but I set everything in Throttlestop and power plan as on ac adapter.
    I have used Ultimate power plan

    Also with ac timer at 2 Throttlestop bench gave fastes scores

    And what are your findings?
     
    Last edited: Sep 5, 2019
  18. mbk1969

    mbk1969 Ancient Guru

    Messages:
    9,677
    Likes Received:
    6,573
    GPU:
    GF RTX 2070 Super
    @Krzyslaw
    What is "AC" timers? I understand by the context that you speak about system timer, but "AC"???
     
  19. Krzyslaw

    Krzyslaw Master Guru

    Messages:
    210
    Likes Received:
    57
    GPU:
    MSI GTX1060 6GB
    In Throttlestop it is called AC Timer resolution, but yes I mean timer resolution or kernel tick which can be set from 0.5 to 15,6

    For setting timers I was using ISLC
     
  20. Krzyslaw

    Krzyslaw Master Guru

    Messages:
    210
    Likes Received:
    57
    GPU:
    MSI GTX1060 6GB
    By the way as I made tests on laptop I waited betwean each test for the cpu and gpu to cool down.
    I tried to Run each test at the same starting temperature separately for cpu and gpu as in this laptop Both have separate cooling so The scores would be no influenced by temp from previous tests.

    And of course The scores I posted are average from 3 runs
     

Share This Page