Pages

Thursday, August 30, 2012

Windows 8 and DPC Latency

If you measure the DPC Latency using LatencyMon, Windows 8 has a very high DPC (Deferred Procedure Call ) latency. In Windows 7, the same PC would have had about 100us of DPC Latency. Is this a problem?

If you do not know what DPC latency is, read the part: "Background information: Why drop-outs occur", at the bottom of this link.

Basically, what it says is that if the DPC latency is high, you will get pauses in real-time operations, such as listening to music and playing a video. Lower the DPC latency, the better. Most of the time, a high DPC latency is caused by bad drivers which spend too much time in the DPC routines. The drivers have to wait for their DPC routine until the one before them finishes with its DPC routine. When these waits become too long, you will get pauses or drop-outs in real-time operations.

In Windows 8, Microsoft have paid a lot of attention to power saving. One thing they have done is removing transparency from Aero theme which according to them consumes too much CPU cycles, hence quicker battery drain. Another relates to how the DPC queues are handled. Basically, they have lowered the frequency of CPU getting out of idle state unnecessarily.

But this has resulted in Windows 8 having a high DPC latency. Regardless of what device drivers you have installed, or how fast your PC is, the DPC latency hovers around 1000us most of the times.

But if there is a need, the DPC latency drops to a value much less than what Windows 7 would give in the same PC. You can see that the DPC latency drops if the CPU becomes fully "awake". Run an application that loads up the CPU and you will see that the DPC latency drops down to a very low figure. (Mine drops to around 50us - it was never that low in Windows 7.)

image

If you are having trouble with drop-outs or pauses in video playback or any other real-time operations, you can actually disable this power saving feature easily. Then it will always show the same DPC latency.

Here is how you do it.

Launch Command Prompt under Administrator and type and enter the following command. Then reboot.

bcdedit /set disabledynamictick yes

To go back to the default setting, use the same command except no instead of yes at the end. But for some reason, mine did not change back to the 1000us range. :/

Edit:

I got a BSOD and I had to use the above command to fix it anyway. :/

No comments:

Post a Comment

Related Posts Plugin for WordPress, Blogger...