High DPC Latency on the guest - audio clicking & crackling

Discussions about using Windows guests in VirtualBox.
Post Reply
gspark
Posts: 7
Joined: 11. Aug 2014, 13:05

High DPC Latency on the guest - audio clicking & crackling

Post by gspark »

Hi there,

I am reposting a modified version of a previously posted question, using a hopefully more targeted subject title.

I have found VirtualBox forum posts referring to DPC Latency on the host, but not on the guest.

This is my setup:

- VirtualBox 4.3.14 r95030
- Guest: Win 7 Ultimate (32 bit)
- Host: Macbook Early 2008 (2.4 GHz Intel Core 2 Duo), Mac OS X Lion 10.7.5, 6 GB RAM (
- 1 CPU core and 2 GB of RAM dedicated to the virtual machine
- VirtualBox Guest Additions 4.3.14 installed
- The audio settings used are the recommended ones (CoreAudio and Intel HD Audio, respectively).

I ran the DPC Latency Checker, which gave me an output that looks like this. (No other application was running on the guest during that time.) This leads to distorted audio (clicks and crackles). I want to use the guest for audio programming, so this is obviously a problem for me.

Running the Windows Performance Analyzer I found that the drivers most responsible for this high latency are mainly:

- ataport.sys (causing by far the highest latency, from what I can see)
- i8042prt.sys
- ndis.sys
- ntoskrnl.sys

I tried disabling all the drivers that I could disable - the latency problem persists. Furthermore, Windows is telling me that the drivers supposedly need no updating. Also, I disabled automatic Windows updating and temporarily uninstalled the anti-virus program. I could not see much change in the overall latency.

It was previously suggested that this may be due to a CPU performance problem of the host. However, this really high amount of latency is exhibited in the guest when the total CPU usage of my host is only around 30%.

As my Win 7 guest is a virtual machine, I suppose that the problem with these drivers (especially ataport.sys) is not so much hardware-specific (or not?..).

Thanks in advance for any help.
Attachments
Windows 7 Ultimate-2014-08-15-12-19-27.log
Latest VirtualBox log
(63.39 KiB) Downloaded 10 times
michaln
Oracle Corporation
Posts: 2973
Joined: 19. Dec 2007, 15:45
Primary OS: MS Windows 7
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Any and all
Contact:

Re: High DPC Latency on the guest - audio clicking & crackli

Post by michaln »

gspark wrote:I want to use the guest for audio programming, so this is obviously a problem for me.
In a word, don't.

The reality is that real-time operation in a VM cannot be guaranteed. The VM is subject to scheduling like any other application running on the host and the performance will greatly vary depending on the host hardware and host load.
gspark
Posts: 7
Joined: 11. Aug 2014, 13:05

Re: High DPC Latency on the guest - audio clicking & crackli

Post by gspark »

I don't mind if real-time operation cannot be strictly guaranteed. I can live with some increased latency and a few drop-outs now and then. But what I'm experiencing is worse than that.

I'm clueless in how VMs work, but when the host CPU load is only around 30% I would expect the guest to have a 'reasonable' audio streaming performance.

So, what I'm basically asking is: has anyone had a better performance with a similar setup to mine? If so, there should be something I can do to fix it.

Otherwise I'll just have to do it natively, and I'm trying to avoid this.
Perryg
Site Moderator
Posts: 34369
Joined: 6. Sep 2008, 22:55
Primary OS: Linux other
VBox Version: OSE self-compiled
Guest OSses: *NIX

Re: High DPC Latency on the guest - audio clicking & crackli

Post by Perryg »

Try enabling HPET for the guest. See VBoxManage modifyvm in your VirtualBox manual.
gspark
Posts: 7
Joined: 11. Aug 2014, 13:05

Re: High DPC Latency on the guest - audio clicking & crackli

Post by gspark »

Perryg wrote:Try enabling HPET for the guest. See VBoxManage modifyvm in your VirtualBox manual.
Thanks for the suggestion. With this modification the latency appears to be somewhat lower than before - however it's still mostly in the red area, so the problem remains.
Post Reply