How to Diagnose and Fix High DPC Latency Issues with WPA (Windows Vista/7/8)

This tutorial will show you how to identify drivers causing high Deferred Procedure Call (DPC) latencies. Spikes of high DPC latency can cause a computer to slow to a crawl for a few seconds before speeding up again in super-speed to catch up, then repeating a number of seconds later. During the few seconds of slowness (high latency spike), you may notice jerky and erratic mouse movement, poor quality, stuttering, audio, and pausing and skipping in real time video playback. If these symptoms sound familiar, read on.

The technique outlined below will work on Windows 7 and Windows 8. It will not work on Windows XP, but an alternative for Step II has been briefly outlined at the bottom of this tutorial for Windows Vista.

In addition, this technique is fairly technically advanced. Although it should be perfectly possible for anyone to complete provided you follow carefully the instructions given, if you require further clarification of any particular steps, or run into any sort of difficulties, please do not hesitate to ask us for help.


Step I (optional): Making a Quick Diagnosis:
[This part is not yet possible on Windows 8 computers. If you are using Windows 8, please skip ahead to Step II]

This step will allow you to quickly and easily determine whether or not high DPC latencies are indeed a problem on your computer. It is not necessary to perform this step, since it will not show you the cause of any DPC latency spikes it does find. Step II will be used to determine the cause any of such problems, and so you may wish to skip ahead to Step II now.

1. Download and run DPC Latency Checker from this website: DPC Latency Checker

2. Allow it to run until you have experienced a period of lagging and computer slowness. It is important to allow the program to run through such a time period in order to make a proper diagnosis. Having it running only whilst the computer is performing normally is not nearly as effective.

3. Analyze the graph for a large spike into the reds. A healthy graph will remain in the green section, and will look similar to this:
1.PNG

A graph containing spikes into the red (indicative of a DPC latency problem) will look similar to this:
2.png
Now identify whether or not you have a DPC Latency problem using the graphs given above as a reference. If you do, continue on to Step II to identify the cause of this problem.



Step II (if necessary): Identifying the Cause:
[This technique is not possible on Windows Vista computers. If you are using Windows Vista, please skip ahead to the end of this step for a briefly outlined alternative.]
This step will use the Microsoft Windows Performance Analyzer from the Windows Assessment and Deployment Kit (ADK) to identify the cause of any DPC latency spikes.

1. Download the ADK from this website: Download Windows Assessment and Deployment Kit (ADK) for Windows® 8.1 from Official Microsoft Download Centre
Ignore the reference to Windows 8.1. This download applies to both Windows 7 and Windows 8.

2. Run ADKSetup.exe and allow it to initialize past the splash screen.
[The following screenshots may be expanded by clicking on them if registered]

Click Next:
3.PNG


Click Next again (you may opt in to CEIP if you so wish - it is not necessary, but you may wish to do so):
4.PNG


Click Accept:
5.PNG


Alter the checkmarks to be next to the following box only:
Windows Performance Toolkit

and click Install.
10.PNG


Allow the install to complete:
11.PNG


and finally click Close:
9.PNG



Part 2:

[Windows 7] Click on the Start Orb, search for cmd, and press Enter.
[Windows 8] Swipe up or right click on the Start Screen, select All Apps, swipe or scroll to the right, and under the Windows System section, open Command Prompt.

Now, in Command Prompt:

Type out the following line and press Enter:
xperf -on DiagEasy

Nothing much will appear to happen, but xperf is now logging. Wait until the computer has gone through a period of stuttering slowness, and then type out the next line and press Enter (this line may take several seconds to process):
xperf -d %userprofile%\Desktop\trace.etl

Finally type this line and press Enter:
xperf %userprofile%\Desktop\trace.etl

If you get prompted the following message, select Yes:
1.PNG



A new window will now open, and after initializing, will containing several graphs.

Scroll down to the graph titled DPC CPU usage, right click on it, and select Summary Table. The example graph show below comes from a healthy computer, yours is likely to show much larger spikes and a smaller scale on the % usage axis.
2.PNG



A final new window will open containing a list of drivers. This list is already correctly sorted (by the Actual Duration column). The driver on the very top of the list is therefore likely to be the cause of your problem. Note down its name from the leftmost column.
3.PNG



You may now close both Windows Performance Analyzer windows and go back to the Command Prompt.

Type the following line final line and press Enter:
del %userprofile%\Desktop\trace.etl

Now close the Command Prompt window.


Part 3:

Now you need to fix the problem. With the driver name in hand, first try to identify where it comes from. Our Driver Reference Table (located here: Driver Reference Table) will help you with this task. It is a large database of many common drivers, and it is likely that the driver you are searching for is there. If you are, however, unable to identify the driver there, please do not hesitate to ask us for help.

Once you have identified the driver, you need to update it from the manufacturer's website. The Driver Reference Table should point you to such a website for the drivers that are contained within it.

Just download and install the latest version of the driver, and hopefully your DPC related problems will be resolved.


However, if they are not resolved, you continue to have problems after updating the driver, or you continue to experience other problems, please do not hesitate to ask us for assistance, providing as much detail as is possible. You will be required to register with this forum before you are able to create a new thread (you can register here: Register at Sysnative Forums), but this process is quick and completely free.



Alternative Step II for Windows Vista

As an alternative to Step II for Windows Vista computers, you may use a program called LatencyMon which can be downloaded here: Resplendence Software - Free Downloads

Once installed, start LatencyMon from the Start Orb > All Programs > LatencyMon.

In the top left hand corner of the window which opens, click on the green start button (highlighted in the image below). Then navigate to the Drivers tab, sort by the Total Execution (ms) column, and wait until the computer has gone through one of its periods of lagging or stuttering. Finally, read off and note down the driver at the top of the list, and continue with Part 3 of Step II.

4.PNG
 
Last edited:
well i finally got around to installing the the newer assessment and deployment kit. But i get this error:
C:\Users\Admin\Desktop>xperf %userprofile%\Desktop\trace.etl
xperf: error: C:\Users\Admin\Desktop\trace.etl: The parameter is incorrect. (0x80070057).


Microsoft (R) Windows (R) Performance Analyzer Version 6.3.9600
Performance Analyzer Command Line
Copyright (c) 2013 Microsoft Corporation. All rights reserved.


Usage: xperf options ...


xperf -help start for logger start options
xperf -help providers for known tracing flags
xperf -help stackwalk for stack walking options
xperf -help stop for logger stop options
xperf -help merge for merge multiple trace files
xperf -help processing for trace processing options
xperf -help symbols for symbol decoding configuration
xperf -help query for query options
xperf -help mark for mark and mark-flush
xperf -help format for time and timespan formats on the command line
xperf -help profiles for profile options

then i tried this
C:\Users\Admin\Desktop>xperf trace.etl

and got the same error

&

I get error when I run xperf% userprofile% \ Desktop \ trace.etl
please help me i have windows 8.1



Download this instead of link(s) posted from the begining of this thread ;)

Download Windows Assessment and Deployment Kit (ADK) for Windows® 8 from Official Microsoft Download Center

:cheers:
 
I am using Windows 7 Enterprise 64-bit. I think that a recent update has been causing latency on this desktop machine, as well as my laptop that runs Win7 Professional 64-bit. Things seemed fine up until about 10 days ago, then both of them started having problems. Now I can't listen to audio or watch video without major stuttering. DPC Latency Checker goes way in to the red, off the top of the chart, with just my audio player and Mozilla open with a few tabs. I am wondering if a Chrome update or a Windows Update caused it. I use the latest version of Chrome 64-bit.

I am having trouble getting Performance Analyzer to open the trace. Under Part 2, for this step:
"Finally type this line and press Enter:
xperf %userprofile%\Desktop\trace.etl"

I get this error: "xperf: error: trace.etl: The parameter is incorrect. (0x80070057)."

So I opened the Windows Performance Analyzer GUI, and used it to open the trace file. But I don't see the DPC CPU Usage graph that the instructions mention. I expanded the headings "CPU Usage (Precise)" and "DPC/ISR", but don't find that graph.
 
I figured it out. It seems Windows Performance Analyzer has moved things around a bit since this OP was written. The graph is called DPC/ISR: DPC/ISR Duration by Module/Function. It's a main graph with an expansion arrow to its left. I right-clicked on it and selected Add Graph to Analysis View. That gave me a chart that listed ndis.sys, tcip.sys and netio.sys as the culprits. I am using the latest driver available from the manufacturer for my Qualcomm Atheros 8151 NIC.

I did some digging, and it turned out this was related to my recently enabling a free trial of Avast Internet Security; previously I'd just been using Avast Free Antivirus but it offered me a free 21 day trial of their Internet Security product. It's apparently a known issue that their Firewall and other network "features" cause DPC latency. Which is a real shame because their free product is great. So I ended the trial, rebooted, and let it finish uninstalling itself.

Then I fired up DPC Latency checker, played some 24/192 audio, and re-launched 64-bit Chrome with my usual dozens of tabs. Everything's great, it very rarely gets above 500ÎĽs and always stays below 1000.

Thanks so much for the OP niemero, very helpful. Please consider updating it to reflect the new command for invoking Windows Performance Analyzer, which is now "wpa trace.etl". And detailing the correct location of the DPC graph in the new layout. The OP got me there, I just had to do some research to find the updated information. Much appreciated!
 
I got this parameter error while im on step 2 part 2 on CMD 2015-07-29_1-48-50.png On the last command code: xperf %userprofile%\Desktop\trace.etl
 
I figured it out. It seems Windows Performance Analyzer has moved things around a bit since this OP was written. The graph is called DPC/ISR: DPC/ISR Duration by Module/Function. It's a main graph with an expansion arrow to its left. I right-clicked on it and selected Add Graph to Analysis View. That gave me a chart that listed ndis.sys, tcip.sys and netio.sys as the culprits. I am using the latest driver available from the manufacturer for my Qualcomm Atheros 8151 NIC.

I did some digging, and it turned out this was related to my recently enabling a free trial of Avast Internet Security; previously I'd just been using Avast Free Antivirus but it offered me a free 21 day trial of their Internet Security product. It's apparently a known issue that their Firewall and other network "features" cause DPC latency. Which is a real shame because their free product is great. So I ended the trial, rebooted, and let it finish uninstalling itself.

Then I fired up DPC Latency checker, played some 24/192 audio, and re-launched 64-bit Chrome with my usual dozens of tabs. Everything's great, it very rarely gets above 500ÎĽs and always stays below 1000.

Thanks so much for the OP niemero, very helpful. Please consider updating it to reflect the new command for invoking Windows Performance Analyzer, which is now "wpa trace.etl". And detailing the correct location of the DPC graph in the new layout. The OP got me there, I just had to do some research to find the updated information. Much appreciated!
I disabled the firewall without restarting and that fixed it! I have tried everything and I'm so glad I found this thread. I even wasted money on an intel network driver...well that's two network drivers lmao!

GODSPEED TO YOU! FINAL-FREAKINGLY I SOLVED IT!!!!
 
CMD Prompt- use WPA instead

WPA %userprofile%\Desktop\trace.etl

if you get error
parameter is incorrect 0x80070057
running xperf %userprofile%\Desktop\trace.etl
xperf: error: C:\Users\Admin\Desktop\trace.etl: The parameter is incorrect. (0x80070057). run

WPA %userprofile%\Desktop\trace.etl
 
After following this tutorial and running Windows Performance Analyser it shows 31 modules where only two are black and the rest are marked as red. One of them shows a duration at 415.... ms, second one at 363... ms, and the rest are from 152 down to 0.000446 ms.
Does it mean that those drivers with a high duration are the cause of possible slowness during the operation on my laptop?
 
Hi I found this forum from a google search. Im experiencing high latency all USB related. Ran latencymon first and while I must say I get same results in kernel latency on two different rigs one Intel and one AMD it does show main culrpit as usbport.sys, thing is I have all drivers updated as well as AMD chipset drivers to latest ones same goes for the intel rig. But what worries me is not the kernel latency in latencymon, its the indepth latency test specifically at dispatch level which is showing on CPU core 0 over 100 us which is a problem and it turns red. Making gaming unplayable with stuttering and high VAR in source engine based games. I disabled legacy usb in bios and am using the usb 3.0 ports and still same thing only latencymon or xperf no longer shows usbport.sys which are 1.1 and 2.0 driver, its showing etron XHCI.sys as the main culprit and go figure etron makes the USB 3.0 controller on this board. I do not understand I have been using this board for almost 2 year its an Asrock Fatality Killer 990FX I have tried multiple bios and newest still samething. RMAed the board to them and they claim its either my end or an AMD problem. But I think they just dont want to do their job and pointing the finger. Any ideas? This problem started happenig after I rebuilt rig after a suspected hardware infection, only new parts are video and mouse, video is an XFX R9 280 and mouse a Razer Deathadder Chroma. Thing is I swapped both with still same issue. Any ideas? Been pulling my hair out for over a month here

NOTE: Also storport.sys is giving a high ISR count as well. Not worried about a few others that give low numbers, main concern are USB and storport

Yes all drivers are updated
 
Ok I found the real driver that causes this, not indicated by perf or latencymon.

Its the amd cat video drivers for Win 10 I think.

If I uninstall driver and use basic MS display driver the latency tests pass. Now this is either a Win 10 driver issue with AMD cards and I tried every driver from 15.7 to 15.11 same thing. Reverting to 8.1 now and trying 15.6, if it still happens Im going to assume either defective video OR insufficient power, PSU is capable but I dont have an 8 pin connector and this uses 6 pin and 8 pin, using an adapter from 6 to 8 and never had a problem in the past but I dunno.

Installing 8.1 now and maybe contact XFX tomorrow
 
Bleh it just happens less without amd drivers. This is driving me nuts, no matter what drivers I use this happens. I swapped every part of hardware except mobo, just RMAed it still same thing. Either idiot tech from mobo company sent me same exact board cause he claims its an "AMD" problem or this is some sort of hardware infection.

Let me try and post a screenie of drivers section causing thislatencymonscreen.jpg
 
I have a Toshiba Satellite C650D Laptop with Windows 7.

I followed this tutorial as best I could and it didn't resolve my issue. Here's what I did:

1. Ran Command Prompt as Administrator.
2. Typed in the following commands.

xperf -on DiagEasy
xperf -d %userprofile%\Desktop\trace.etl
WPA %userprofile%\Desktop\trace.etl

Note: I had to use WPA in the last command prompt because xperf didn't work and that seemed to be the fix I saw in the thread.

Here's where it started to deviate a little for me and I had to make some approximations because the graphs that showed up for me didn't match up exactly with the tutorial. I have something called "Graph Explorer" on the left side of WPA and they are separated into categories.

System Activity
Computation
Storage
Memory

and some of these categories had further categories. I clicked on Computation and there were 3 more categories.

CPU Usage (Precise) - Utilization by Process, Thread
DPC/ISR - Duration by Module, Function
CPU Usage (Attributed) - Utilization by Process, Thread, Activity

I checked under DPC/ISR - Duration by Module, Function since that seemed to be what was needed and there were multiple graphs. I'm stuck here because I'm not sure which one to use and there is no exact graph called DPC CPU Usage.
 
Hi Amrit. :welcome:
It is usually better to open a new thread/topic in the correct forum section, instead to post inside a guide.
A post in a guide could/should be to thank for the guide or to add something interesting to the guide or to update it.
Hence I suggest you to open your own topic in the windows 7 subforum or in the BSOD, Crashes, Kernel Debugging one.

:wave:
 
Hello, I have recently been running into some issues while doing any kind of recording/capturing with my laptop. After some poking around online, I came across this quick guide, but in step II after the CMD "Xperf -On DiagEasy" I type in the next sets of commands and get these errors:

C:\Windows\system32>xperf -d %userprofile%\desktop\trace.etl
xperf: error: -d: does not expect 2 argument(s).
Trace Stop options:


xperf [-stop [LoggerNames]|[ProfileFileName!ProfileName|SessionName merged.e
tl]]|[-cancel ProfileFileName!ProfileName|SessionName [NoDelete]] [-d merged.etl
] [-heap]


-stop LoggerNames|ProfileFileName!ProfileName|SessionName merged.e
tl Turn off loggers specified in LoggerNames.
Or Turns off loggers in profile ProfileName


defined in file ProfileFileName and merge
the ETL files to merged.etl. Or Turns off
logger SessionName defined in file
ProfileFileName and merge the ETL file to
merged.etl.
-d merged.etl Merge the ETL files of stopped logging
sessions into merged.etl; if no session is


stopped explicitly, the "NT Kernel Logger"


is stopped implicitly.
-BootTrace off Turn off boot trace
-heap Stop heap tracing
-cancel ProfileFileName!ProfileName|SessionName [NoDelete] Turn off
loggers in profile ProfileName
defined in file ProfileFileName and delete


the trace files. Or Turns off logger
SessionName defined in file ProfileFileName


and merge the ETL file to merged.etl. If
NoDelete is specified than trace files are


not deleted


If LoggerNames are not given, or -d is specified without -stop present, the


kernel logger will be stopped.


C:\Windows\system32>xperf %userprofile%\desktop\trace.etl
xperf: error: C:\Users\Lucklss: The parameter is incorrect. (0x80070057).


Microsoft (R) Windows (R) Performance Analyzer Version 6.3.9600
Performance Analyzer Command Line
Copyright (c) 2013 Microsoft Corporation. All rights reserved.


Usage: xperf options ...


xperf -help start for logger start options
xperf -help providers for known tracing flags
xperf -help stackwalk for stack walking options
xperf -help stop for logger stop options
xperf -help merge for merge multiple trace files
xperf -help processing for trace processing options
xperf -help symbols for symbol decoding configuration
xperf -help query for query options
xperf -help mark for mark and mark-flush
xperf -help format for time and timespan formats on the comman
d line
xperf -help profiles for profile options
 
Hi Luckless Zombie. :welcome:
Re-try with the following one (always from an elevated command prompt):
Code:
xperf -d "%userprofile%\Desktop\trace.etl"
 
Back
Top