How to optimize Windows 10 for Low Input Lag?

Everything about latency. Tips, testing methods, mouse lag, display lag, game engine lag, network lag, whole input lag chain, VSYNC OFF vs VSYNC ON, and more! Input Lag Articles on Blur Busters.
1000WATT
Posts: 391
Joined: 22 Jul 2018, 05:44

Re: How to optimize Windows 10 for Low Input Lag?

Post by 1000WATT » 30 Oct 2020, 08:35

howiec wrote:
29 Oct 2020, 17:06
Also, on some systems like mine (Asus Hero X), you cannot disable HPET in the BIOS. Unless I'm missing something, disabling HPET in dev mgr, deleting useplatformclock, enabling useplatformtick should achieve the same/similar results.
FYI, I also enable disabledynamictick .
This is a modified BIOS for X HERO 2301. Firmware via usb drive. Experiment if you like.
201030161707.jpg
201030161707.jpg (127.99 KiB) Viewed 7938 times
201030161620.jpg
201030161620.jpg (145.23 KiB) Viewed 7938 times
If you change xhci. the keyboard will not work in bios but will work in win. Reset BIOS will help.
I'll tell you on my own: I use the default settings.

https://drive.google.com/file/d/1JrB6hT ... sp=sharing
I often do not clearly state my thoughts. google translate is far from perfect. And in addition to the translator, I myself am mistaken. Do not take me seriously.

howiec
Posts: 183
Joined: 17 Jun 2014, 15:36

Re: How to optimize Windows 10 for Low Input Lag?

Post by howiec » 30 Oct 2020, 09:05

1000WATT wrote:
30 Oct 2020, 08:35
This is a modified BIOS for X HERO 2301. Firmware via usb drive. Experiment if you like.
Kool, thanks!
I should've stated I have the WiFi version though.

ffs_
Posts: 47
Joined: 24 Jul 2020, 00:57

Re: How to optimize Windows 10 for Low Input Lag?

Post by ffs_ » 31 Oct 2020, 05:50

howiec wrote:
29 Oct 2020, 16:16
Sorry, but generally speaking, that's incorrect.

Lower max ISR and DPC latency by definition is an indicator of how quickly your system can respond to any given interrupt and execute the driver routine and/or other code.
Input-lag =/= DPC latency. I'm pretty sure you can have low input-lag even if your DPC/ISR latency is abnormal high. Though your gameplay experience will be far from optimal probably.

But as long as your average ISR/DPC is in normal range and doesn't spike higher than, let's say, 500 us (although even 1000 us is still green zone in LatencyMon), I doubt you will see/feel much difference. You can check your DPC/ISR during playing a game, it probably will spike to 200-400 us (maybe even higher), but your game will be still smooth enough.
howiec wrote:
29 Oct 2020, 16:16
However, with testing across 2 systems (my old Q6600 and my current 8700k builds with various GPUs) I've clearly found that HPET has severely degraded gaming performance on my Intel systems.

The "mouse feel" will likely change with HPET on/off so although I don't have any experience with an AMD or Ryzen system, I can guess that you simply prefer the HPET mouse feel in your system-specific setup (HW & SW).
That's why I clarified: "On my Ryzen PC".
1000WATT wrote:
30 Oct 2020, 08:35
If you change xhci. the keyboard will not work in bios but will work in win. Reset BIOS will help.
I managed to turn off "USB legacy support" and "XHCI legacy support" and everything worked in full UEFI mode, but I didn't notice any benefits, so it wasn't worth experimenting with these options.

howiec
Posts: 183
Joined: 17 Jun 2014, 15:36

Re: How to optimize Windows 10 for Low Input Lag?

Post by howiec » 31 Oct 2020, 07:45

ffs_ wrote:
31 Oct 2020, 05:50
Input-lag =/= DPC latency. I'm pretty sure you can have low input-lag even if your DPC/ISR latency is abnormal high. Though your gameplay experience will be far from optimal probably.

But as long as your average ISR/DPC is in normal range and doesn't spike higher than, let's say, 500 us (although even 1000 us is still green zone in LatencyMon), I doubt you will see/feel much difference. You can check your DPC/ISR during playing a game, it probably will spike to 200-400 us (maybe even higher), but your game will be still smooth enough.
As I said, it's an indicator. If you have very high average ISR/DPC latencies, you will likely have higher input lag especially if those devices are affected, e.g. if the mouse/kb or GPU are on any affected CPUs.

Saying someone may not notice the difference between a system with 10us vs one with 500us avg latency is purely speculative and is dependent on many other factors including the person and the rest of the PC system (both HW & SW). A person who doesn't notice it doesn't mean there isn't increased input-lag either.

Also, the main point in measuring latency when mostly idle is to see how quickly your system can respond to an interrupt. So while I see the merits of measuring latency during load, the data has to be used and interpreted carefully.
ffs_ wrote:
31 Oct 2020, 05:50
That's why I clarified: "On my Ryzen PC".
...Which is why I said 'on my Intel systems'.
Regardless, HPET should have increased overhead for any platform.

ffs_
Posts: 47
Joined: 24 Jul 2020, 00:57

Re: How to optimize Windows 10 for Low Input Lag?

Post by ffs_ » 31 Oct 2020, 08:11

You need to read carefully, I didn't say there is no difference between "a system with 10us vs one with 500us avg latency". I said there is no difference between 30 us and 50 us, but the thing is: you won't get such numbers while playing a game, only during idle.

Yes, DPC/ISR latency is an indicator, but not indicator of input-lag.
howiec wrote:
31 Oct 2020, 07:45
...Which is why I said 'on my Intel systems'.
Regardless, HPET should have increased overhead for any platform.
Nope, you didn't mention any platform in your original post, which is why I had to write that "HPET enabled" might work better on AMD.

howiec
Posts: 183
Joined: 17 Jun 2014, 15:36

Re: How to optimize Windows 10 for Low Input Lag?

Post by howiec » 31 Oct 2020, 17:43

ffs_ wrote:
31 Oct 2020, 08:11
You need to read carefully, I didn't say there is no difference between "a system with 10us vs one with 500us avg latency". I said there is no difference between 30 us and 50 us, but the thing is: you won't get such numbers while playing a game, only during idle.

Yes, DPC/ISR latency is an indicator, but not indicator of input-lag.
howiec wrote:
31 Oct 2020, 07:45
...Which is why I said 'on my Intel systems'.
Regardless, HPET should have increased overhead for any platform.
Nope, you didn't mention any platform in your original post, which is why I had to write that "HPET enabled" might work better on AMD.
Dude, the latency for the CPU/OS to respond to an input and then process relevant driver commands and other code is the definition of the general term input lag... It's just obviously not the entire picture. That's a fundamental concept.

Asking me to read carefully... when I just explained the difference between idle and load measurements. You're going in circles. And you said 500, not 50.

Duh, I mentioned Intel in response to your post to be honest that I haven't tried Ryzen. Then you say that's why you mentioned Ryzen. Then I mentioned it should be platform independent (as far as increased overhead is concerned). Then again... circles. Let's not debate the irrelevant.

ffs_
Posts: 47
Joined: 24 Jul 2020, 00:57

Re: How to optimize Windows 10 for Low Input Lag?

Post by ffs_ » 01 Nov 2020, 02:31

Apparently 50 us was about latency while idle and 500 us was about latency while playing the game. But idle latency is rather a spherical chicken in vacuum. If you have bad latency during idle, of course you need to lower it. But you could have good latency during idle and huge spikes (1000+ us) during playing the game. So check idle latency AND latency while playing. 5-10 or 50 us during idle doesn't mean much if you get 500+ us or even 1000+ us during playing the game. And if you get 200-300 us while playing the game anyway, it doesn't really matter if using HPET raises idle latency, and it doesn't mean that your input-lag was raised as well. That was the point.
howiec wrote:
31 Oct 2020, 17:43
Duh, I mentioned Intel in response to your post to be honest that I haven't tried Ryzen. Then you say that's why you mentioned Ryzen. Then I mentioned it should be platform independent (as far as increased overhead is concerned). Then again... circles. Let's not debate the irrelevant.
Nope, I'm talking about your original post where you gave a general advice:
howiec wrote:
27 Oct 2020, 14:08
However, as he mentions, do not enable HPET if you want low latency. I highly recommend to ensure it is disabled for most gamers.
after which I made a gentle hint that results might be different for different platforms. if you mentioned from the beginning that your advice is applicable to Intel platform mostly and you're not sure about AMD, I wouldn't say a word.

ffs_
Posts: 47
Joined: 24 Jul 2020, 00:57

Re: How to optimize Windows 10 for Low Input Lag?

Post by ffs_ » 01 Nov 2020, 04:14

In case someone interested, here are my latencies with HPET enabled in BIOS + "useplatformclock true" in OS (Windows 10 v2004).

Idle: https://i.imgur.com/Ld8ORhN.png
Playing CSDM: https://i.imgur.com/I2nVZQP.png

howiec
Posts: 183
Joined: 17 Jun 2014, 15:36

Re: How to optimize Windows 10 for Low Input Lag?

Post by howiec » 01 Nov 2020, 05:40

ffs_ wrote:
01 Nov 2020, 02:31
Apparently 50 us was about latency while idle and 500 us was about latency while playing the game. But idle latency is rather a spherical chicken in vacuum. If you have bad latency during idle, of course you need to lower it. But you could have good latency during idle and huge spikes (1000+ us) during playing the game. So check idle latency AND latency while playing. 5-10 or 50 us during idle doesn't mean much if you get 500+ us or even 1000+ us during playing the game. And if you get 200-300 us while playing the game anyway, it doesn't really matter if using HPET raises idle latency, and it doesn't mean that your input-lag was raised as well. That was the point.
And you're still missing the point that the idle latency is generally the quickest the system can respond (assuming outside of a power saving mode). A system under load should have even higher input lag assuming any of the CPUs or resources handling the mouse/kb/GPU interrupts are affected (again there are other factors to consider, e.g. manually assigned interrupt affinity to combat this, how much load is applied).
HPET overhead applies to both idle and load, and hence can increase latency in both cases as well, thus affecting input lag. Whether or not you notice it and/or prefer it on/off in your games or programs is a different thing.

If you are so adamant that HPET:On + useplatformclock:true does not increase input lag at all, simply put it to the test for your case.
Either use an LDAT if you have access to one, reflex analyzer, or very high FPS capture with all the correct camera settings like how Chief does it.
ffs_ wrote:
01 Nov 2020, 02:31
howiec wrote:
31 Oct 2020, 17:43
Duh, I mentioned Intel in response to your post to be honest that I haven't tried Ryzen. Then you say that's why you mentioned Ryzen. Then I mentioned it should be platform independent (as far as increased overhead is concerned). Then again... circles. Let's not debate the irrelevant.
Nope, I'm talking about your original post where you gave a general advice:
howiec wrote:
27 Oct 2020, 14:08
However, as he mentions, do not enable HPET if you want low latency. I highly recommend to ensure it is disabled for most gamers.
after which I made a gentle hint that results might be different for different platforms. if you mentioned from the beginning that your advice is applicable to Intel platform mostly and you're not sure about AMD, I wouldn't say a word.
Why are we still talking about this?
I gave general advice because HPET has increased overhead by design.
Then you mentioned your Ryzen system.
Then I mentioned Intel to be clear that I haven't tested Ryzen firsthand.
Then you said that's why you mentioned Ryzen.

We're saying the same thing: We're on different platforms...

Yes, I can say a word because simply looking at the actual HPET architecture vs TSC, it's obvious that it's slower/more costly to access.
The performance loss may not be as bad on a newer Ryzen vs current Intel systems but it still cannot be as "fast" as TSC.

There are various test and supporting data out there. Heck, even the Linux kernel code bashes HPET to some degree for various related and unrelated reasons.
https://github.com/torvalds/linux/blob/ ... nel/hpet.c

ffs_
Posts: 47
Joined: 24 Jul 2020, 00:57

Re: How to optimize Windows 10 for Low Input Lag?

Post by ffs_ » 01 Nov 2020, 07:20

howiec wrote:
01 Nov 2020, 05:40
And you're still missing the point that the idle latency is generally the quickest the system can respond (assuming outside of a power saving mode).
That's all great, but how it will help when you're playing the game, or you just enjoy your "low latency" on the desktop? :)
howiec wrote:
01 Nov 2020, 05:40
A system under load should have even higher input lag
And again, input-lag or latency? :)
howiec wrote:
01 Nov 2020, 05:40
HPET overhead applies to both idle and load, and hence can increase latency in both cases as well, thus affecting input lag. Whether or not you notice it and/or prefer it on/off in your games or programs is a different thing.

If you are so adamant that HPET:On + useplatformclock:true does not increase input lag at all, simply put it to the test for your case.
Either use an LDAT if you have access to one, reflex analyzer, or very high FPS capture with all the correct camera settings like how Chief does it.
I don't have access to anything of those. You can post your LatencyMon results (idle and in-game) so we could compare numbers and see how "bad" HPET is. I posted my LatencyMon results above and I think they're far from bad despite using HPET.
howiec wrote:
01 Nov 2020, 05:40
Why are we still talking about this?
I gave general advice because HPET has increased overhead by design.
Then you mentioned your Ryzen system.
Then I mentioned Intel to be clear that I haven't tested Ryzen firsthand.
Then you said that's why you mentioned Ryzen.

We're saying the same thing: We're on different platforms...

Yes, I can say a word because simply looking at the actual HPET architecture vs TSC, it's obvious that it's slower/more costly to access.
The performance loss may not be as bad on a newer Ryzen vs current Intel systems but it still cannot be as "fast" as TSC.

There are various test and supporting data out there. Heck, even the Linux kernel code bashes HPET to some degree for various related and unrelated reasons.
https://github.com/torvalds/linux/blob/ ... nel/hpet.c
That's all cool and you can bash HPET as much as you want or "prove" how "bad" it is compared to TSC or other timer(s), but the thing is I didn't say HPET is generally better or faster or gives less ISR/DPC latency than TSC or other timer(s), I only said it gives better mouse input (better input-lag) on my system even if it costs a bit of performance and ISR/DPC latency. I'm aware that in theory TSC should be better, and I can even tell you a secret: I have HPET disabled in BIOS on my old Intel PC because it gives me better results in both latency and input-lag, but for some reason on my Ryzen PC it's vice versa. ¯\_(ツ)_/¯

Post Reply