Kernel timer latency?

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.
OnlyForThemMoment
Posts: 3
Joined: 22 Sep 2022, 13:08

Re: Kernel timer latency?

Post by OnlyForThemMoment » 24 Sep 2022, 14:45

RealNC wrote:
24 Sep 2022, 04:41
OnlyForThemMoment wrote:
23 Sep 2022, 17:31
That's very interesting! Thank you for your help in clearing that up for me. And yes, it seems as it's not changing during gaming either.
Try https://github.com/tebjan/TimerTool
Thank you for the response! It seems as both ISLC & Timer Tool also have no effect here, I did however find out that by using an somewhat older version called "DPC Checker" to measure DPC I was able to somehow "force" the timer down to 1000us. I have no idea about the techinical stuff that goes behind this, as I'm farily new to "tech" in general. But this does not seem much of a fix, and more of a band-aid. I'd like to figure out why it's not at 1000 by default, preferably without having to re-install the OS haha
Attachments
DPC2.PNG
DPC2.PNG (999.88 KiB) Viewed 4344 times

Shade7
Posts: 222
Joined: 25 May 2022, 18:44

Re: Kernel timer latency?

Post by Shade7 » 28 Sep 2022, 00:30

OnlyForThemMoment wrote:
24 Sep 2022, 14:45
RealNC wrote:
24 Sep 2022, 04:41
OnlyForThemMoment wrote:
23 Sep 2022, 17:31
That's very interesting! Thank you for your help in clearing that up for me. And yes, it seems as it's not changing during gaming either.
Try https://github.com/tebjan/TimerTool
Thank you for the response! It seems as both ISLC & Timer Tool also have no effect here, I did however find out that by using an somewhat older version called "DPC Checker" to measure DPC I was able to somehow "force" the timer down to 1000us. I have no idea about the techinical stuff that goes behind this, as I'm farily new to "tech" in general. But this does not seem much of a fix, and more of a band-aid. I'd like to figure out why it's not at 1000 by default, preferably without having to re-install the OS haha
Interesting. So you're saying opening "DPC Checker" is the only thing you found to be able to force the timer down from the initial higher values? As soon as you close the checker does it revert back? And do you "feel"/notice any difference once the timer value is forced down?

vhagar
Posts: 10
Joined: 27 Sep 2022, 05:10

Re: Kernel timer latency?

Post by vhagar » 28 Sep 2022, 06:44

Shade7 wrote:
28 Sep 2022, 00:30
OnlyForThemMoment wrote:
24 Sep 2022, 14:45
RealNC wrote:
24 Sep 2022, 04:41
OnlyForThemMoment wrote:
23 Sep 2022, 17:31
That's very interesting! Thank you for your help in clearing that up for me. And yes, it seems as it's not changing during gaming either.
Try https://github.com/tebjan/TimerTool
Thank you for the response! It seems as both ISLC & Timer Tool also have no effect here, I did however find out that by using an somewhat older version called "DPC Checker" to measure DPC I was able to somehow "force" the timer down to 1000us. I have no idea about the techinical stuff that goes behind this, as I'm farily new to "tech" in general. But this does not seem much of a fix, and more of a band-aid. I'd like to figure out why it's not at 1000 by default, preferably without having to re-install the OS haha
Interesting. So you're saying opening "DPC Checker" is the only thing you found to be able to force the timer down from the initial higher values? As soon as you close the checker does it revert back? And do you "feel"/notice any difference once the timer value is forced down?
I can confirm, I've tried this exact thing with LatencyMon and have the same results and running DPC Checker does force the timer down. And yes, when you close it the kernel reading goes back sky high in the red as shown.

Running DPC Checker on / not running and Timer Resolution (max:.5ms) feels very quick and snappy for me.

Shade7
Posts: 222
Joined: 25 May 2022, 18:44

Re: Kernel timer latency?

Post by Shade7 » 30 Sep 2022, 00:03

vhagar wrote:
28 Sep 2022, 06:44
Shade7 wrote:
28 Sep 2022, 00:30
OnlyForThemMoment wrote:
24 Sep 2022, 14:45
RealNC wrote:
24 Sep 2022, 04:41


Try https://github.com/tebjan/TimerTool
Thank you for the response! It seems as both ISLC & Timer Tool also have no effect here, I did however find out that by using an somewhat older version called "DPC Checker" to measure DPC I was able to somehow "force" the timer down to 1000us. I have no idea about the techinical stuff that goes behind this, as I'm farily new to "tech" in general. But this does not seem much of a fix, and more of a band-aid. I'd like to figure out why it's not at 1000 by default, preferably without having to re-install the OS haha
Interesting. So you're saying opening "DPC Checker" is the only thing you found to be able to force the timer down from the initial higher values? As soon as you close the checker does it revert back? And do you "feel"/notice any difference once the timer value is forced down?
I can confirm, I've tried this exact thing with LatencyMon and have the same results and running DPC Checker does force the timer down. And yes, when you close it the kernel reading goes back sky high in the red as shown.

Running DPC Checker on / not running and Timer Resolution (max:.5ms) feels very quick and snappy for me.
What's a "normal" reading from DPC Checker. First time using this tool. Having spikes to "1000" every few seconds.

Vocaleyes
Posts: 286
Joined: 09 Nov 2021, 18:10

Re: Kernel timer latency?

Post by Vocaleyes » 01 Oct 2022, 03:10

Issue persists whilst using ultimate performance power plan, USB selective suspend disabled, power savings unchecked for each USB controller, all C-states and power savings full disabled using scewin to check no hidden ones in BIOS etc.. everything.

The only 2 things that seem to change the latencymon kernel timer results are running DPC checker, or while playing around with bcdedit settings. When toying around with bcdedit I noticed that with DPC checker open, the timings would change from 0.5-1 to 0.8 to 1.2.

Vocaleyes
Posts: 286
Joined: 09 Nov 2021, 18:10

Re: Kernel timer latency?

Post by Vocaleyes » 02 Oct 2022, 04:03

Found this documentation that I found quite interesting regarding system timers and their current state. I feel it may be relevant.

https://randomascii.wordpress.com/2020/ ... le-change/

User avatar
RealNC
Site Admin
Posts: 3730
Joined: 24 Dec 2013, 18:32
Contact:

Re: Kernel timer latency?

Post by RealNC » 02 Oct 2022, 08:14

Vocaleyes wrote:
02 Oct 2022, 04:03
Found this documentation that I found quite interesting regarding system timers and their current state. I feel it may be relevant.

https://randomascii.wordpress.com/2020/ ... le-change/
Nice catch! Looks like we now need an injector that calls timeBeginPeriod() before the main entrypoint.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Vocaleyes
Posts: 286
Joined: 09 Nov 2021, 18:10

Re: Kernel timer latency?

Post by Vocaleyes » 02 Oct 2022, 16:58

This comment by the user Gerard particularly caught my eye, quoting -

“It is not true, that nothing has changed, if you called timeBeginPeriod in your program all along.

I am writing a streaming application, that used one shot CreateTimerQueueTimer timers to trigger the sending of UDP packets every few milliseconds. Since Win 10 2004 this is broken, my timers only fire after 15ms despite calling timeBeginPeriod(1). I changed it to use timeSetEvent, now it works again, including on Windows 10 2004 and 20H2.

So since the 2004 update CreateTimerQueueTimer() ignores the resolution defined by timeBeginPeriod.

Unfortunately timeSetEvent is desclared obsolete, with a recommendation to use the (now broken) CreateTimerQueueTimer. On the other hand timeSetEvent has been declared obsolete since at least 2008 (earliest mention of the obsolence found in a quick Google search) and it is still around. Hopefully it will stay oder Microsoft fixes CreateTimerQueueTimer.”

mybad
Posts: 50
Joined: 17 Mar 2022, 21:12

Re: Kernel timer latency?

Post by mybad » 03 Oct 2022, 02:19

RealNC wrote:
02 Oct 2022, 08:14
Nice catch! Looks like we now need an injector that calls timeBeginPeriod() before the main entrypoint.
Citation needed...

User avatar
RealNC
Site Admin
Posts: 3730
Joined: 24 Dec 2013, 18:32
Contact:

Re: Kernel timer latency?

Post by RealNC » 03 Oct 2022, 06:41

mybad wrote:
03 Oct 2022, 02:19
RealNC wrote:
02 Oct 2022, 08:14
Nice catch! Looks like we now need an injector that calls timeBeginPeriod() before the main entrypoint.
Citation needed...
It was already given: the documentation now says it's per-process. So an injector is needed so that the timeBeginPeriod() call happens in the game's process itself, not by a another process.
SteamGitHubStack Overflow
The views and opinions expressed in my posts are my own and do not necessarily reflect the official policy or position of Blur Busters.

Post Reply