This latency is killing me!

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
Member
Joined 2007
Paid Member
Duh, I just recalled something! SY, while Uriah was visiting my home this weekend, he used his laptop via USB to his new DAC and to my head amp I've put together (sounds gooood).

We took a break, went back, and he turned it on. Horrible cracking and popping..just awful. He had connected the psu back to the laptop to charge the battery. He unplugged it..snap crackle pop gone!

Have you given that a try?
 
Not going to read back through the thread now to check, but have you tried upgrading the graphics drivers? Try going directly to the vendor's site ie. Nvidia, AMD/ATI, or Intel. Sometimes they cause havoc, switching rapidly between power saving states.
 
Just another Moderator
Joined 2003
Paid Member
Hi SY. How much memory does your laptop have? Since you have vista I'd say you really need the 3GB maximum that 32bit vista supports (and even that is probably not enough)...

The thing I picked up from that latency mon was that it mentioned hard page faults, and the disk driver seemed to be a culprit.... This would tend to indicate that you have less memory than needed and the machine is paging to virtual memory. This will definitely cause major latency if it is in fact occuring.

If it is memory constrained, either increasing memory or turning off various components that are using memory should help.

edit: 9YO bit... when your computer runs out of memory it coppies some from ram (fast) out to Hard Disk (slow) to make some memory available for something else. When the program that needs that coppied out ram needs to access it again, the computer needs to move some other memory out to disk and then reload the required memory that was previously coppied out to disk.

Tony.
 
Last edited:
Battery: no diff. 4GB RAM. That Speedstep sounds like something worth looking at- can it be turned off?

I wonder- if the disk drive is causing the page faults, perhaps the defrag suggested before could help? I'll run that after I go to bed tonight.

I'll look into the video drivers. Couldn't hurt.:D
 
Just another Moderator
Joined 2003
Paid Member
Hi SY, press <ctrl><alt><delete> and choose task manager (I'm assuming this works in vista as it does in XP and Windows 7)

click on the performance tab and have a look at what it says beside Available (in the Physical memory section). screen shot below is XP. and I've got about 600MB of memory free. If the number here is very low then you may have something hogging all of your memory. I've never quite worked out Windows paging stats, give me unix any day ;)

Tony.
 

Attachments

  • task_manager.png
    task_manager.png
    18.2 KB · Views: 143
The DPC spikes are the problem, and SpeedStep won't make much of a dent in them. I had similar problems on my desktop, I figured it was actually a motherboard/BIOS issue, so gave up and used another PC for music. In the meantime I switched the video card to no effect.

Disk drives don't cause page faults, programs do. Disk drives are part of the solution to page faults.:D Defragging can't harm but won't eliminate the spikes.
 
OK, my perspective:

First off, Vista/Win7 seldom need defraging because the OS does it on the fly in the background. I had an office computer at my parents office running for the past year or so and when I checked the fragmentation it was still at 0%. Worst I have ever seen was 1%. Now this statement excludes drives that are either a) dying, b) almost entirely full or c) had a LOT of stuff written to them recently (windows hasn't had time to defrag in the background).

Secondly, have you tried a system file checker (to make sure that all of the system files are intact and haven't gotten corrupted). It is pretty easy to run:
Command Prompt (run as an administrator) type in sfc /scannow and hit enter. It will scan all of the system files, compare them against the backups and replace any that have become corrupted.

Third, I didn't see it mentioned but I could have missed it, have you installed ASIO4All? This maybe why you don't see the ASIO option.

This is all I can think of at the moment. Do you notice anything like the hard drive thrashing when the latency spikes occur?
 
Hi SY, press <ctrl><alt><delete> and choose task manager (I'm assuming this works in vista as it does in XP and Windows 7)

click on the performance tab and have a look at what it says beside Available (in the Physical memory section). screen shot below is XP. and I've got about 600MB of memory free. If the number here is very low then you may have something hogging all of your memory. I've never quite worked out Windows paging stats, give me unix any day ;)

Tony.
Kind of the same, but to get to the REALLY good info click on the link on that page called Resource Monitor (only present in Vista/Win7). It will give you much more indepth details on things like Networking, Hard drive usage (what programs are accessing the HD), CPU usage (PID, number of threads in a program, etc.) and memory usage.

The DPC spikes are the problem, and SpeedStep won't make much of a dent in them. I had similar problems on my desktop, I figured it was actually a motherboard/BIOS issue, so gave up and used another PC for music. In the meantime I switched the video card to no effect.

Disk drives don't cause page faults, programs do. Disk drives are part of the solution to page faults.:D Defragging can't harm but won't eliminate the spikes.

While I agree on the defragging. A HD that is being occupied by other things (say the IDE/SATA bus is saturated with reads or writes) will have a hard time pulling data out of the pagefile resulting in increased latency.
 
Last edited:
I downloaded this dpclat.exe program onto my cheap Toshiba C660D laptop running Windows 7 Home Premium Service Pack 1 V.721 - I ran it & could see that my baseline was pretty good at around 80uS but it jumped to 2000us at regular intervals. My wireless LAN was the cause of this - lesson is turn it off when playing audio or use a wired LAN connection (this had no impact on latency).

Don't know if this helps?
 
While I agree on the defragging. A HD that is being occupied by other things (say the IDE/SATA bus is saturated with reads or writes) will have a hard time pulling data out of the pagefile resulting in increased latency.

SATA bus saturation is unlikely - its 3Gbps and cheap laptop CPUs just aren't that grunty. This DPC problem is low-level, I dunno why the OS would consider pulling disk drive data into memory a higher priority than audio IRQs. But, being Windows Vista, it may indeed have its priorities ***-about-face.:D
 
Haha, yeah saturating the SATA bus is unlikely (unless an SSD is being used) but the drive itself can become saturated in that case. In my simplification I neglected to mention this detail as the end result is the same. The drive gets bogged down with reads.

I think there is a priority level, typically pagefaults are VERY high priority as ignoring these can result in stalled system (possible race condition). Though I would assume an IRQ to be higher. I really am not sure how dynamic IRQ systems are handled anymore anyways. Such an antiquated concept that just refuses to die.
 
Hi SY. How much memory does your laptop have? Since you have vista I'd say you really need the 3GB maximum that 32bit vista supports (and even that is probably not enough)...

The thing I picked up from that latency mon was that it mentioned hard page faults, and the disk driver seemed to be a culprit.... This would tend to indicate that you have less memory than needed and the machine is paging to virtual memory. This will definitely cause major latency if it is in fact occuring.

If it is memory constrained, either increasing memory or turning off various components that are using memory should help.

edit: 9YO bit... when your computer runs out of memory it coppies some from ram (fast) out to Hard Disk (slow) to make some memory available for something else. When the program that needs that coppied out ram needs to access it again, the computer needs to move some other memory out to disk and then reload the required memory that was previously coppied out to disk.

Tony.

I agree with Tony - this is most likely your problem & worth investigating - all his advice is sound!
 
The drive gets bogged down with reads.

I'm assuming that as its a fairly old laptop it isn't an SSD. Yes, laptop drives are a big bottleneck, perhaps they run at just 4200rpm.

I think there is a priority level, typically pagefaults are VERY high priority as ignoring these can result in stalled system (possible race condition).

The pagefault itself will be high priority, but that triggers a whole slew of actions to remedy the fault. Those actions take ages - going off to disk runs into at least 10mS. So its possible that this is the reason for the DPC spikes up to 20mS, but then every access to disk would incur it. What's so special about pagefaults? Working out what page to load from disk can't possibly take 20mS and even if it did, why would it be non-interruptible?
 
Well, I understood about 20% of all that, so I must be improving. Here's a shot of the resource monitor. Any clues?

(NB: When I'm playing music, or trying to, or trying to do these checks, the wireless is always turned off by disabling the driver; the exception was the resource check)
 

Attachments

  • sysmon.jpg
    sysmon.jpg
    218.9 KB · Views: 117
I'm assuming that as its a fairly old laptop it isn't an SSD. Yes, laptop drives are a big bottleneck, perhaps they run at just 4200rpm.



The pagefault itself will be high priority, but that triggers a whole slew of actions to remedy the fault. Those actions take ages - going off to disk runs into at least 10mS. So its possible that this is the reason for the DPC spikes up to 20mS, but then every access to disk would incur it. What's so special about pagefaults? Working out what page to load from disk can't possibly take 20mS and even if it did, why would it be non-interruptible?
What if there are multiple page faults or the read/write queue has something in progress. For example, writes can take quite a while and once started will go to completion. Now mind you I am not saying this is definitively the issue, just something to keep in mind.
 
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.