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:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    If you will disable HPET in BIOS and then will force platform timer then you will get 2,(smth) MHz, IIRC, - LAPIC timer.

    But believe me 3,4MHz (for TSC) is better option.
     
    Last edited: Jan 12, 2020
  2. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    It was long ago and it was trash talking.
     
  3. Ripan_

    Ripan_ Member

    Messages:
    33
    Likes Received:
    0
    GPU:
    980ti
    Ah okey. But in your opinion what are the pros of having hpet fully on vs hpet - tsc?
     
  4. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    I don`t know what "HPET - TSC" is.
    We know only this: in Win7, Win8+ and older builds of Win10 either TSC or platform timer (HPET, LAPIC) is used for implementation of two Win API functions - QueryPerformanceCounter and QueryPerformanceFrequency. These two functions can be used to measure the time spans with big accuracy/resolution.
    Period.
    We don't know how else Windows uses TSC and platform timers.
    Latest builds of Win10 started to use some new synthetic timer for QueryPerformanceCounter and QueryPerformanceFrequency.
    So when people write "TSC+HPET" in my opinion they just speculate that Windows uses those combos of timers for something.

    As for "HPET vs TSC", in most cases TSC is better (for QueryPerformanceCounter and QueryPerformanceFrequency). Just because TSC is a timer (counter actually, but nvm) right inside CPU core(s), while HPET is a timer (also a counter) which resides somewhere on the motherborad - outside of CPU - and time penalties for its use are big.
     

  5. bobblunderton

    bobblunderton Master Guru

    Messages:
    408
    Likes Received:
    193
    GPU:
    EVGA 2070 Super 8gb
    I toggled this on my i7 4790k system (I don't know if my Ryzen has this option in Bios at all) a year or two ago with Windows 7 and found:
    With HPET on, performance is more consistent.
    With HPET off, performance would speed up in bursts, to be much smoother feeling, but to take away from that, the bursts were inconsistent across the length of time the application was run - bursting in speed/smoothness sometimes more than others. So sometimes the simulation I was running 'felt' slower or faster than with HPET on.
    I was using BeamNG Drive to test, with enough vehicles active to saturate the processor with physics commands.
    General desktop usage 'felt' smoother with it off, so I left it off.
    There was no ill effects to leaving it on or off.
    For doing audio/video production I would leave it on to keep the system more consistent, but this is where you would want Latency Monitor to verify.
     
  6. Ripan_

    Ripan_ Member

    Messages:
    33
    Likes Received:
    0
    GPU:
    980ti

    I thought hpet enables in bios and not in windows was hpet tsc. So do you think I should disable hpet in bios aswell or stay at enabled in bios and not in windows?
     
  7. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    Leave HPET "On" in BIOS, and do not set "useplatformclock" in Windows - this combination is considered the best on modern platforms.

    HPET can be used by 3rd party tools (for example, HWiNFO).

    Unfortunately we do not have Windows kernel team programmers here at guru3d. They could enlighten us on the use of timers by OS kernel.
     
  8. Ripan_

    Ripan_ Member

    Messages:
    33
    Likes Received:
    0
    GPU:
    980ti
  9. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    Yes.
    If you manually set "usefirmwarepcisettings" you can simply remove it and let Windows decide.

    You should. You can try to game both with HPET on and off and decide by your feelings from gameplay.
     
  10. Ripan_

    Ripan_ Member

    Messages:
    33
    Likes Received:
    0
    GPU:
    980ti

    Do you use usefirmwarepcisettings on?

    Edit: when i disabled hpet in deviceM i got more stability. Thats wierd since i disabled it in cmd before, is it the same?
     
    Last edited: Jan 14, 2020

  11. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    Of course not.

    Not the same. In device manager you disable that device, preventing all components of Windows to use it. Through BCD command you forbid Windows to use that device as implementation for certain API functions, allowing other components of Windows to use it.
     
    Tiny_Clanger likes this.
  12. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,938
    Likes Received:
    4,030
    GPU:
    GTX 1080ti
    the hpet driver in device manager doesn't actually have a driver, nor does it actually do anything.
     
  13. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    That does not prevent user (and Windows) to disable the device, right?
     
  14. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,938
    Likes Received:
    4,030
    GPU:
    GTX 1080ti
    you can't disable something that doesn't load any drivers.
     
  15. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    Device manager shows not drivers loaded, but devices discovered.
    Many devices without actual drivers show (in resources tab) memory and/or I/O range. These are memory mapped device interface and port device interface.
    If kernel code wants to interact with such device it should write/read the memory address or output/input the port. Are you sure that when device is disabled any code in kernel is still capable to read/write memory range or input/output ports occupied by device? Most probably if device is disabled then accessing memory range or ports does nothing.
     
    Last edited: Jan 15, 2020

  16. Astyanax

    Astyanax Ancient Guru

    Messages:
    10,938
    Likes Received:
    4,030
    GPU:
    GTX 1080ti
    its a common placebo that it does anything, hpet timer still works with the device disabled.
     
  17. mbk1969

    mbk1969 Ancient Guru

    Messages:
    10,910
    Likes Received:
    8,163
    GPU:
    GF RTX 2070 Super
    How can you test that?

    PS This has no logic from PNP subsystem point of view. Device is discovered at boot stage, device claims certain memory range and I/O ports, system shows such device in device manager as enabled and working. If device was disabled by user, PNP subsystem should disable device - thus freeing claimed memory range and I/O ports, and system shows such device in device manager as disabled.

    PPS But of course if PNP subsystem doesn't disable physical device, then such device should be accessible even when disabled in Windows.
     
    Last edited: Jan 15, 2020
  18. Ripan_

    Ripan_ Member

    Messages:
    33
    Likes Received:
    0
    GPU:
    980ti
    When i do a test in csgo with it on i got 423 fps and then i turned it off and did it again and i got 443. Made the test couple of times.

    BUT what also happens is when i join a server the first ten seconds is like im recording with fraps you know when it caps to a lower fps. This doesnt happen later but only when you first start. And it disepears when i turn hpet on in devicem.
     
    Last edited: Jan 16, 2020
  19. Sephiroth

    Sephiroth Member

    Messages:
    13
    Likes Received:
    3
    GPU:
    Asus Rx580 8gb
    Forcing hpet on my intel 2600k and rx580 pc causes inconsistent mouse movement and microstutters in call of duty 4 promod even though its running at 250fps.
     
  20. janos666

    janos666 Maha Guru

    Messages:
    1,037
    Likes Received:
    171
    GPU:
    MSI RTX3080 10Gb
    I am not an expert but I think Device Manager only disables the driver, not the device itself. Trivial example: try to disable your VGA card and see if you still get picture on your display. Of course you loose all hardware capabilities which would require an appropriate driver but HPET has no such driver to begin with. So, I guess the Windows kernel can still use it after you disabled it in DM. I am not sure about user mode software which tries to access it directly (not through some OS API), that might looses access to the device. This should be fairly easy to test (if you have some software which is know to access HPET for some functionality and has some indication when it happens).
     

Share This Page