1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Another look at HPET High Precision Event Timer

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

  1. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    There is no consensus about that. You can test yourself.

    I have read this
    https://www.tweakhound.com/2014/01/30/timer-tweaks-benchmarked/
    - benchmark-wise there were no benefits.

    This 'tscsyncpolicy' is about synchronizing TSCs between multiple cores/processors. And it feels like about stability and not about performance.
     
  2. Ancymon

    Ancymon Active Member

    Messages:
    55
    Likes Received:
    9
    GPU:
    GTX 1070
    Just one thing about the HPET setting in BIOS that I noticed on my system (Win 7 & Z77 mb - nothing changed in os). When its Enabled (by def), the timer resolution(s) are rounded to the full values: 15.6, 10, 1, 0.5 ms but when its set to Disabled then they look like this: 15.625, 7.8125, 0.9765, 0.4882 ms (and the feel of the mouse cursor seems to be lighter, snappier, but less precise).
     
  3. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
  4. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    Yes you can.
    Have you seen the linked page:
    I understand this description as "useplatformclock yes" forces the use of platform clocks, and useplatformclock no" forbids the use of platform clocks.

    HPET is namely platform clock.
    https://docs.microsoft.com/en-us/windows/desktop/SysInfo/acquiring-high-resolution-time-stamps
     
    Last edited: Oct 7, 2018

  5. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
    No you can't.

    You misunderstand what you're reading.

    "useplatformclock yes" makes HPET the default timer for all events, overriding the potential use of TSC and QPC.

    ""useplatformclock no" is the same as having no useplatformclock at all and hpet will be used only where specifically called to use by the hardware.

    There is no way to tell a system with HPET present and enabled in the chipset never to use it.
     
  6. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    May be I misunderstood the difference between "useplatformclock no", "useplatformclock yes" and absence of "useplatformclock". But it can be you, because to me it looks like absence of "useplatformclock" means default mode when OS kernel decides itself, while "useplatformclock no" means "do not use".

    But one thing you misunderstood 100%. The setting "useplatformclock" tells OS kernel what to chose as implementation of QueryPerformanceCounter function - platform clocks/timers/counters or TSC or whatever else. And nothing more. I see no room for another interpretations of the phrase "Forces the use of the platform clock as the system's performance counter." Outside the QueryPerformanceCounter any kernel code can utilize any present platform hardware as it wants.

    Are you a kernel programmer from Microsoft team? I am not and I will not discuss this any more. I am OK with my understanding and you OK with yours. Other gurus can chose the side in this disagreement themselves.

    PS (Just in case) In my post
    https://forums.guru3d.com/threads/a...ision-event-timer.368604/page-58#post-5592656
    I meant namely about forbidding the Windows to use platform clocks as QPC implementation. I did not mean that you can forbid to use platform clocks completely.
     
    Last edited: Oct 8, 2018
  7. aufkrawall2

    aufkrawall2 Master Guru

    Messages:
    414
    Likes Received:
    3
    GPU:
    MSI RX 580 Armor
    When is that the case? Can software call it too? And is it really beneficial for anything?
     
  8. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
    I know what you mean, but there are others who literally believe setting NO completely prevents the system from using HPET. (i wish it did).

    I actually meant software there rather than hardware.

    Windows chooses the best timer for the task, mostly defaulting to ITSC but QPC can be requested by the application.


    When doing multicore optimisations though, TSC is the best bet.
     
    Last edited: Oct 9, 2018
  9. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    Just in case, QPC is not hardware counter/timer/clock. QPC is abbreviation for API function QueryPerformanceCounter (which can be called by any application in Windows). And implementation of this function depends on "useplatformclock" and hardware counters/timers/clock in the system.
     
    Last edited: Oct 9, 2018
  10. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
    I know, QPC in that post is umbrella for whatever the system has that meets the needs.
     

  11. X7007

    X7007 Maha Guru

    Messages:
    1,422
    Likes Received:
    9
    GPU:
    Inno3D 1080GTX
    Windows 1809 edition changed the timer, it's not Invariant TSC anymore . and the HPET one is with the command platformclock true
    [​IMG]
     
  12. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
    10mhz result is because of 1809 using hypervisor based security.

    its still using ITSC at its core.
     
  13. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    HPET provides 14MHz for QPC as you can see. That frequency value - 10MHz for unknown performance counter and 14MHz for HPET - is just a return value from WinAPI function QueryPerformaceFrequency. So MS invented something new. May be they use some combo of TSC and another counter.

    In the lower windows in screenshots we see that result for synthetic test with HPET is 30 times worse than result of test with this new 10MHz thing. If this new counter was HPET the results of synthetic tests would be the same.
     
  14. Blackfyre

    Blackfyre Maha Guru

    Messages:
    1,001
    Likes Received:
    30
    GPU:
    MSI 1070 Gaming X
    So out of curiosity, what combination of commands do you run to decrease latency & increase performance as much as possible? What are the set of commands you run basically after a clean install of Windows?

    For example for me, I disable HPET in BIOS & in Windows (using the command).

    But for best latency & performance overall, I also run MSI mode on all devices (windows automatically won't allow the devices that cannot run in MSI mode to run in MSI mode anyway), I use Process Lasso in High Performance Mode with Bitsum Highest Performance as my active power profile, and for network, I use the tips from SpeedGuide & their forums, a combination of registry edits and optimisations (including the use of TCPOptimizer). MSIAfterburner to lock the voltage at highest and overclock of my core & memory to its best ability (running at max clocks even at idle).
     
  15. aufkrawall2

    aufkrawall2 Master Guru

    Messages:
    414
    Likes Received:
    3
    GPU:
    MSI RX 580 Armor
    I don't think those measures are necessary. I suppose the only "real" danger is that some shady benchmarks set up HPET as a system timer via bcdedit. Apart from that, I assume this old garbage doesn't ever get used anymore anyway.

    Linux btw. seems to be less confusing than Windows in this regard. "cat /sys/devices/system/clocksource/clocksource0/current_clocksource" shows the current clocksource and "cat /sys/devices/system/clocksource/clocksource0/available_clocksource" the available ones. Those are tsc, acpi_pm and hpet (if I keep it enabled in bios). Without manually changing something, always TSC is used.

    Well, I don't think there has been a proof in this thread that HPET would have any real advantage over TSC in any real case. I got a Skylake system with HPET disabled in bios: runs flawlessly. My brother has a Ryzen 2 system with HPET disabled in bios: Runs flawlessly too.
    My vote would be to let this discussion cease and use TSC happily ever after. :p
     

  16. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    Just in case, TSC is not clock. TSC is counter which lets to calculate the time span between two measures. HPET is counter too but it has ability to set single (not periodic) "alarm". Modern Windows and Linux have tickless kernel, but usually RTC chip is used for periodic - clock - interrupts.
     
    Last edited: Oct 16, 2018
  17. Astyanax

    Astyanax Ancient Guru

    Messages:
    2,589
    Likes Received:
    651
    GPU:
    GTX 1080ti
    This, and if you have an Intel nic, set the device manager advanced settings to have Interrupt moderation rate set to Minimal.
     
    Last edited: Oct 17, 2018
  18. EdKiefer

    EdKiefer Ancient Guru

    Messages:
    2,239
    Likes Received:
    172
    GPU:
    MSI 970 Gaming 4G
    I only have enable/disable and have set it to disabled for a while now.

    Edit: I see, you mean "Interrupt moderation rate" not Interrupt moderation option.

    PS: I have P8Z77 MB,
    Intel(R) 82579V Gigabit Network Connection
     
    Last edited: Oct 17, 2018
  19. mbk1969

    mbk1969 Ancient Guru

    Messages:
    7,495
    Likes Received:
    4,035
    GPU:
    GeForce GTX 1070
    Guys will you stop bumping this irrelevant necro thread?
     
    Last edited: Oct 17, 2018
  20. Martigen

    Martigen Master Guru

    Messages:
    313
    Likes Received:
    81
    GPU:
    GTX 1080Ti SLI
    I dunno, I didn't know about that new timer tool or the intel interrupt moderation tip. Glad it popped up.

    That said, as a debate, yes there's nothing more to add -- just install Win 10 and don't touch anything to do with HPET, Windows will work out what's best.
     

Share This Page