DPC latency issue

Everything about latency. This section is mainly user/consumer discussion. (Peer-reviewed scientific discussion should go in Laboratory section). Tips, 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.
dsavovic25
Posts: 20
Joined: 23 May 2025, 09:16

DPC latency issue

Post by dsavovic25 » 27 Jun 2025, 07:03

Greetings!
So, long story short I've been having issue where I can't really figure out why is ntoskrnl.exe slowing down my system. Since I've done a lot of testing, I will try to debrief everything I've tried/done:

- Clean Windows 10 (Atlas 22H2)
- Minimal drivers meaning I've installed only chipset driver with necessary drivers for GPU (RX 570) and external audio card (Focusrite 2i4)
- I've disabled SATA controller in bios and audio controller aswell
- I've configured MSIUtilV3 which I will post a picture of
- Disabled ULPS
- I've tried all of the USB port combinations, just to test it out
- Processor Idle demote and promote are set to 100% in power plan
- Tried older ethernet driver (RTL8111G) but it performs pretty much the same even with the newer driver

The latencymon pictures are captured on a clean reboot, with keyboard and mouse connected only with nothing running in the background. Any help would be highly appreciatable, cause I'm not sure what more can I try. Thanks
Attachments
3.png
3.png (29.55 KiB) Viewed 10124 times
2.png
2.png (110.26 KiB) Viewed 10124 times
1.png
1.png (59.62 KiB) Viewed 10124 times

User avatar
kyube
Posts: 545
Joined: 29 Jan 2018, 12:03

Re: DPC latency issue

Post by kyube » 27 Jun 2025, 13:33

dsavovic25 wrote:
27 Jun 2025, 07:03
Greetings!
So, long story short I've been having issue where I can't really figure out why is ntoskrnl.exe slowing down my system. Since I've done a lot of testing, I will try to debrief everything I've tried/done:

- Clean Windows 10 (Atlas 22H2)
- Minimal drivers meaning I've installed only chipset driver with necessary drivers for GPU (RX 570) and external audio card (Focusrite 2i4)
- I've disabled SATA controller in bios and audio controller aswell
- I've configured MSIUtilV3 which I will post a picture of
- Disabled ULPS
- I've tried all of the USB port combinations, just to test it out
- Processor Idle demote and promote are set to 100% in power plan
- Tried older ethernet driver (RTL8111G) but it performs pretty much the same even with the newer driver

The latencymon pictures are captured on a clean reboot, with keyboard and mouse connected only with nothing running in the background. Any help would be highly appreciatable, cause I'm not sure what more can I try. Thanks
- LatencyMon is a useless test to evaluate DPC/ISR performance. Refer to the thread in my signature for more information.
Instead, use ETW-based scripts, such as xtw or xperf (the former is preferable)
https://github.com/valleyofdoom/xtw
https://github.com/valleyofdoom/PC-Tuni ... dpcisr.bat

- External audio cards cause severe audio latency & USB driver overhead, avoid using those and opt for onboard controller (ideally ALC1220 or lower, optical out)

- Custom pre-built ISO's are usually detrimental to performance, follow https://github.com/valleyofdoom/PC-Tuning instead.

- Could you tell us the full list of your HW components? I assume you're trying to find a culprit for your low FPS.
No amount of DPC/ISR optimizations can circumvent the severe GPU bottleneck you'd have in competitive games.

dsavovic25
Posts: 20
Joined: 23 May 2025, 09:16

Re: DPC latency issue

Post by dsavovic25 » 27 Jun 2025, 14:22

So, first of all my goal was to maintain lowest latency possible.. I've think I've already done good amount of windows optimizations since I have no other issues other than the one I've mentioned. I do some light gaming, but I usually play competitive shooters which kinda rely on being fast and latency is crucial but I also use this build for audio recordings in my studio. So, using an onboard audio card is probably not the option I have.. I'm 95% sure that the Focusrite is not the problem here cause I've tried the same latency test without it. I've even tried it without anything plugged in. I haven't tried xtw and I will take a look at it, if it's more in depth analyzer.

Here are the specs:
MSI Z97 PC MATE
I7 4790k
Asus Expedition RX 570
Kingston 32gb 1866mhz DDR3
Adata SX8200 Pro 1TB M.2 (going through pcie x4 adapter)
Seasonic 650w Gold

dsavovic25
Posts: 20
Joined: 23 May 2025, 09:16

Re: DPC latency issue

Post by dsavovic25 » 27 Jun 2025, 14:50

Here is the xtw output that I got after starting xtw_etl_collection.bat.
Attachments
xtw-report.7z
(2.13 KiB) Downloaded 450 times

User avatar
kyube
Posts: 545
Joined: 29 Jan 2018, 12:03

Re: DPC latency issue

Post by kyube » 27 Jun 2025, 19:43

dsavovic25 wrote:
27 Jun 2025, 14:22
So, first of all my goal was to maintain lowest latency possible.. I've think I've already done good amount of windows optimizations since I have no other issues other than the one I've mentioned.
I do some light gaming, but I usually play competitive shooters which kinda rely on being fast and latency is crucial but I also use this build for audio recordings in my studio.
“Maintain lowest latency possible” is a difficult task to achieve with the specifications you are on, unless you are gaming extremely old titles from DX9 era (CS 1.6 etc.)
No amount of OS tuning would alleviate the HW hurdle you have (Polaris GPU and 4 core DDR3-era CPU)
Swapping to a Nvidia GPU should give you much better DX9 & OpenGL performance, much more than any possible OS tuning.
If you are playing older games, why not swap to Windows 10 1709-1803 or even Windows 7? This should net you the least amount of CPU overhead from OS bloat.
As per valleyofdoom github repo:
In order of performance scaling, Hardware > BIOS > Operating System.
dsavovic25 wrote:
27 Jun 2025, 14:22
So, using an onboard audio card is probably not the option I have...
I'm 95% sure that the Focusrite is not the problem here cause I've tried the same latency test without it.
Your motherboard sadly does not have a toslink output, meaning your options are limited to getting a external PCIe card with optical output for having the lowest possible audio latency & best possible sound quality.
Refer to the audio latency thread in my signature for more information in regards to this topic.

Don't rely on LatencyMon data in the slightest, every single test data it outputs is complete nonsense and should be disregarded.

As for your Focusrite, any USB audio devices impacts other USB peripherals in your PC.
The interrupts for all USB devices are scheduled on the same controller & handled by the same stock MS driver.
The Focusrite steals precious CPUTime from your mouse & keyboard, essentially.

As for your xtw results, you need to tell us what you were doing in the background during the recording...
Ntoskrnl is not an “issue” as you think it is.
Running xtw in idle is somewhat useless...
Last edited by kyube on 29 Jun 2025, 07:42, edited 2 times in total.

dsavovic25
Posts: 20
Joined: 23 May 2025, 09:16

Re: DPC latency issue

Post by dsavovic25 » 27 Jun 2025, 21:33

I'm not sure if we are on the same note here.. I'm not trying to get any magic FPS boosts.. This system is pretty old but it still maintains 120+ fps in CS2 and Valorant without any hiccups. Anything above 100 fps (10 ms of latency) most people should be able to perform fairly descent without any input lag. Both of the games are pretty CPU intensive but old Haswell, which btw gets a pretty big performance boost with a higher ram clock speed, still does an okay job..
- Now, regards to the focusrite debate, while gaming, unless I was using a random sample rate which specific game didn't support for some reason, that might be a big problem.. Cause it would be using much more cpu for upsampling and downsampling in realtime.. Otherwise it should not do much.. Like I said, I've tested their drivers with device plugged in and without.. Ntoskrnl.exe spike occurs in both ways but the performance is the same..
- Oh and in CS 1.6 I believe everyone pretty much used OpenGL cause DirectX was hella bugged. DX9 became much more prominent with L4D2, CSS and CSGO release with their initial Source engine.

daemonjax
Posts: 37
Joined: 13 May 2024, 08:42

Re: DPC latency issue

Post by daemonjax » 28 Jun 2025, 09:43

DPC/ISR latency can be a deep rabbit hole.

Did you already disable in bios all c-states (including package) that aren't c0 or c1?

Did you already modify a clone of the high performance power profile (easiest way to clone it is to just install process lasso to get the bitsum power profile) to expose the setting to disable idling (google: powersettingsexplorer)?

If you didn't do those things already, just try those first. The 2nd thing will for sure fix the issue, but don't use it while idling -- switch to it only when you really need to, like when actually gaming or doing professional audio mixing.

JimCarry
Posts: 586
Joined: 24 May 2024, 20:01
Location: csgo

Re: DPC latency issue

Post by JimCarry » 28 Jun 2025, 10:15

daemonjax wrote:
28 Jun 2025, 09:43
DPC/ISR latency can be a deep rabbit hole.

Did you already disable in bios all c-states (including package) that aren't c0 or c1?

Did you already modify a clone of the high performance power profile (easiest way to clone it is to just install process lasso to get the bitsum power profile) to expose the setting to disable idling (google: powersettingsexplorer)?

If you didn't do those things already, just try those first. The 2nd thing will for sure fix the issue, but don't use it while idling -- switch to it only when you really need to, like when actually gaming or doing professional audio mixing.
if you read his post you see that he did this "- Processor Idle demote and promote are set to 100% in power plan"

User avatar
kyube
Posts: 545
Joined: 29 Jan 2018, 12:03

Re: DPC latency issue

Post by kyube » 28 Jun 2025, 10:45

dsavovic25 wrote:
27 Jun 2025, 21:33
I'm not sure if we are on the same note here.. I'm not trying to get any magic FPS boosts..
This system is pretty old but it still maintains 120+ fps in CS2 and Valorant without any hiccups.
Anything above 100 fps (10 ms of latency) most people should be able to perform fairly decent without any input lag.
I see the CS 1.6 player in you with those statements...
Sorry to say, but they're completely nonsensical.
It's not about “frame rate”, it's about time
Image

Your entire latency chain (due to high GPUTime) is ruined due to the RX570 being insufficient in those games (CS2 in particular), regardless of the Frametime (inverse, in time-domain, value of what you see in when using fps_max) your CPU can output.
What you evaluate as "120+ FPS" using the in-game performance counter has nothing to do with how the game looks like to you in real time., nor does it accurately depict it.
dsavovic25 wrote:
27 Jun 2025, 21:33
Both of the games are pretty CPU intensive but old Haswell, which btw gets a pretty big performance boost with a higher ram clock speed, still does an okay job..
I'm not sure about Valorant, but CS2 is extremely GPU intensive now.
Especially even more so since you're on a Polaris AMD GPU, where the D3D11 implementation is notorious for being terrible.
dsavovic25 wrote:
27 Jun 2025, 21:33
- Now, regards to the focusrite debate, while gaming, unless I was using a random sample rate which specific game didn't support for some reason, that might be a big problem.. Cause it would be using much more cpu for upsampling and downsampling in realtime.. Otherwise it should not do much.. Like I said, I've tested their drivers with device plugged in and without.. Ntoskrnl.exe spike occurs in both ways but the performance is the same..
How have you evaluated that you have “ntoskrnl spikes”? They don't appear in XTW.
All LatencyMon values are useless for any cross-comparisons or for troubleshooting purposes.
You cannot even evaluate the impact of DPC/ISR driver overhead on your games, because you're clogged by the high GPUTime from your GPU being insufficiently quick enough.
Last edited by kyube on 29 Jun 2025, 07:41, edited 1 time in total.

daemonjax
Posts: 37
Joined: 13 May 2024, 08:42

Re: DPC latency issue

Post by daemonjax » 28 Jun 2025, 11:03

JimCarry wrote:
28 Jun 2025, 10:15
Processor Idle demote and promote are set to 100% in power plan"
No, that's different.

There are MANY power plan settings that are hidden by default. To expose them, you use powersetttingsexplorer:

https://forums.guru3d.com/threads/windo ... ty.416058/

There is one in particular that's useful (everything else... not really useful, don't bother): "processor idle disable"

It's either enabled or disabled. When you set it to "disable idle" only the c0 c-state is available to your cpu. Doing it within a cloned power plan let's you easily enable/disable it as needed. Audio engineers mixing studio audio have legit dpc latency concerns, and they do this... on laptops. I'm just saying this is a viable option if you don't want to go down this rabbit hole. Or, you at least do this as a first step to find out if the issue you're experiencing even really truly is a dpc latency issue... before going down this rabbit hole.
Last edited by daemonjax on 28 Jun 2025, 11:12, edited 7 times in total.

Post Reply