Topic: Strange DPC Latency in Windows

Hello Forum,

I have a silent but powerful Windows pc connected via USB to an RME ADI2 DAC and to a Cambridge Audio DAC.
The machine is very "clean", there is basically nothing installed except the audio drivers.
Both USB cables are connected to ports on the motherboard rear plate, so the "electrical path" is the same.

While investigating an unrelated hardware problem, I found this "strange" pattern:

* I'm using Thesycon's DPC Latency Checker to take measurements.

1) when both DACS are on, but the machine is idle, average PDC latency is ~ 90 micros, max is ~ 250 (very stable, over a long interval, say 10 minutes).

2) when playing to CambridgeAudio a flac (playing in loop a single 44100/16bit file using foobar => ASIO. the file is copied to a RAM disk first), latency pattern is still flat but average goes up to 120. occasionally, there are spikes.

3) when playing to ADI2 the same flac, latency has a periodic "ladder" pattern, e.g.

500-400-300-200-100-100-...-100-500-400-300-200-100-100-...-100...[repeat]

a latency measurement is taken every second, and the period length might be 16-17 seconds.
(sorry for the ascii art. I have screenshots but I'm not exactly sure how to post them here...)

again, there are occasional spikes that are pretty high. however audio does not seem to suffer.
also, RME driver does not report any crc error.

the only difference, as far as I see is that CA ASIO uses 512 samples by default and RME is set to 1024, but that should not be a problem.

I'm using the latest RME driver, but I'm not using the latest CA driver (I had some issues and I reverted to a slightly older version).

Is this pattern normal?
thanks,
MH

2 (edited by ramses 2022-11-01 15:20:57)

Re: Strange DPC Latency in Windows

The DPC Latency Checker no longer works properly since Windows 8 because Microsoft changed the kernel timers.

A successor version that supports current versions of Microsoft Windows has not been released yet.

Instead, it is better to use LatencyMon: https://www.resplendence.com/latencymon

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

Re: Strange DPC Latency in Windows

Sorry, I forgot to mention:
I'm aware of the isssues with LatencyMon/Latency Checker, but this machine is Windows 7.

4 (edited by ramses 2022-11-01 15:34:12)

Re: Strange DPC Latency in Windows

m.holmes wrote:

Sorry, I forgot to mention:
I'm aware of the isssues with LatencyMon/Latency Checker, but this machine is Windows 7.

I would use LatencyMon because it shows which driver is causing too high DPC latencies (if this is the issue).

Other reasons might be power saving in nVidia graphic cards, which can be turned off with a tool called powermizer.

This solved audio drops on my system which were not even visible with LatencyMon, which made this issue very nasty.
I stumbled only by occasion over a thread about system optimization in Steinberg's Cubase forum, where this was mentioned.

I know you didn't mention audio drops, but who knows where those latency spikes are coming from .. maybe it helps.

What energy profile are you using?

Did you disable power saving in the BIOS? C-States and if applicable P-States and T-States? C1N?
Did you disable clock spread spectrum?
You can also try to enable TURBO, but to disable Speedstep. Sometimes you end up with such settings with a base clock which is around 200 MHz higher.

This is what I did in my BIOS settings: https://www.tonstudio-forum.de/blog/Ent … -X10SRi-F/

EDIT: on the other hand, if you don't encounter any audible problems (audio dropouts), then you can just ignore it. If you only play music, then you don't need low ASIO buffer sizes and can simply use 1024 or even the maximum value, which relieves the CPU the most.

BR Ramses - UFX III, 12Mic, XTC, ADI-2 Pro FS R BE, RayDAT, X10SRi-F, E5-1680v4, Win10Pro22H2, Cub13

5 (edited by m.holmes 2022-11-01 17:04:33)

Re: Strange DPC Latency in Windows

ramses wrote:

I would use LatencyMon because it shows which driver is causing too high DPC latencies (if this is the issue).

Ok, a bit more context: I have LatencyMon installed but -on this pc- it has some issues with ETW and it floods my event viewer with errors (Cannot start NT Kernel logger - error 0x035, something like that).
Anyway, it can run, but it does not show anything super useful. No single driver seems responsible for the latency.
99% of the dpc activity is coming from the usb driver.
I was using an intel usb driver v4.0x and I upgraded to a 5.0x (from supermicro website - it's a supermicro motherboard)

ramses wrote:

Other reasons might be power saving in nVidia graphic cards, which can be turned off with a tool called powermizer.

That's deprecated, but there is an equivalent setting in the driver, though:
https://nvidia.custhelp.com/app/answers … erformance

I changed to "optimal" to "adaptive" based on some empirical measurements with LatencyMon, but it honestly didn't make much difference.


ramses wrote:

can simply use 1024 or even the maximum value, which relieves the CPU the most.

Exactly: I don't understand why the CA driver is lower-latency, even if it uses 512.

Re: Strange DPC Latency in Windows

FYI, after disabling ipv6 and setting nvidia power to "adaptive", running LatencyMon for 18s while playing music to the RME, I get:

iusb3xhc.sys - Intel(R) USB 3.0 eXtensible Host Controller Driver
isr 143661
dpc 151561
highest ms 0.224080
total 1612.663443

for comparison:
nvlddmkm.sys - NVIDIA Windows Kernel Mode Driver, Version 441.66
0
134
0.049650
0.749833

7

Re: Strange DPC Latency in Windows

Use a native USB2 port, this might fix it.

Regards
Matthias Carstens
RME