1 (edited by Manuel 2013-02-22 17:23:48)

Topic: CPU spikes with idle ASIO driver

Hi all, I am getting CPU spikes with my new PC (new as in "I didn't use it as a DAW before"). Essentially when any ASIO client connects to my FF400, CPU usage in Core 0 starts to go up and down at regular intervals. I have tested with the following ASIO clients:

- Empty project in either Presonus Studio One or Reaper.
- DIGICheck open but nothing playing

My system config is as follows:

- Intel Core i6 920 CPU, 12 GB RAM, 64bit Windows 7
- RME FireFace 400, NI Audio Kontrol 1

I've just tested my previous DAW (an HP Elitebook laptop) and the CPU graph is more or less at 0% all the time using the same settings, so the problem must be with my new computer. I've already performed the usual optimizations (disable core parking, disable processor idle, disabled all unnecessary devices inc. network interfaces, etc, as well as a number of tweaks in the BIOS).

DPC latency on the new system is about 100us on average, which I think is OK for W7. My old DAW had terrible DPC latency though so I don't think this would be related anyway.

The following screenshot shows what I am getting with just DIGICheck and nothing else running (except of course the task manager).

https://dl.dropbox.com/u/98636804/Forums/RME/ASIO%20driver%20CPU%20spikes.png

2 (edited by Manuel 2013-02-22 23:21:11)

Re: CPU spikes with idle ASIO driver

I've just updated the BIOS to latest firmware which has resulted in a number of changes:

1) Significantly improved DPC latency: before I was gettings >100us, now a constant 6-10us which is very nice.
2) The CPU spikes haven't gone away, however now instead of appearing on core 0 they appear on core 1 (total 8 cores)
3) The CPU spikes are taller, reaching 100% some times.
4) The CPU spikes occur less at a rate of 1 spike every 10 seconds.

I have experimented with all settings in the Fireface Settings dialog and no combination has removed the spikes. However, enabling all channels in the the Fireface Mixer affects the shape of the spikes (the more channels the wider the spike).

I've also played with loads of BIOS settings, to no avail. I'll try a fresh OS install tomorrow. Is it possible that changing my graphics card to another PCIe slot might be of help?

3

Re: CPU spikes with idle ASIO driver

You could try to examine what exactly causes the CPU spike - for example with Process Explorer. Also: does the behavior (provided it is caused by FW alone) change when using the legacy FW driver?

Regards
Matthias Carstens
RME

Re: CPU spikes with idle ASIO driver

Thanks MC. Process Explorer shows that a process named "Interrupts" is responsible for the spikes, i.e. not a process in the strict sense of the word. I've just tested the legacy driver and it made the spikes worse i.e. higher average CPU usage. Time between spikes is still about 10 seconds.

I've disabled absolutely every energy saving feature I could think of, both in the BIOS and in Windows. What do you recommend I try next?

Re: CPU spikes with idle ASIO driver

I removed the graphics card altogether and logged onto the computer via remote desktop. It made no difference: the CPU spikes looked just the same.

Re: CPU spikes with idle ASIO driver

If this is an onboard FW connection, try an alternative, e.g. a PCI/e card...

Regards
Daniel Fuchs
RME

Regards
Daniel Fuchs
RME

Re: CPU spikes with idle ASIO driver

Interrupt CPU usage generally means something driver/hardware related.

You can also try disabling hardware/drivers one by one until you isolate it.

Another handy tool is Procmon: http://technet.microsoft.com/en-us/sysi … 96645.aspx

It will show you all registry/file evemts on your PC, it does use a fair bit of CPU for the logging but you may be able to spot something going on during those CPU spikes.  Those spikes don't look random, looks like an even time interval so hopefully you can monitor and isolate it without too much hassle.

8 (edited by Manuel 2013-02-26 03:59:20)

Re: CPU spikes with idle ASIO driver

Hi, thanks for your suggestions.

I've just been performing some "experimental brain surgery" on my computer:

- Tried another Firewire port (my motherboard has two)
- Set up Windows to not use the Fireface as the default system audio device (both playback and recording)
- I've disabled every device that could be disabled
- Stopped literally and all services that Windows allowed me to stop
- Killed every running process
- Disabled every startup entry
- Tried every previous BIOS firmware available

However, the problem continues to exist, so I am running out of ideas. The only things left to do:

- Fresh-install Windows 7 64-bit
- Perhaps install 32-bit Windows to see if that helps
- Try a PCIe Firewire card

Perhaps you guys can add to this list.

Interestingly I have noticed that each time I clear the BIOS the CPU spikes "move" to a different CPU core. For example, the first time I was getting them on Core 0, then on Core 1, then on Core 3, etc.

In case it matters, my FF400 is not setup as the either the system playback or recording device.

9

Re: CPU spikes with idle ASIO driver

In the end this might be an issue caused by the BIOS itself...

Regards
Matthias Carstens
RME

Re: CPU spikes with idle ASIO driver

I would tend to think that a FW PCIe card might be your best bet...

Regards
Daniel Fuchs
RME

Regards
Daniel Fuchs
RME

Re: CPU spikes with idle ASIO driver

What audio buffer settings are you using and does it make any difference, especially changing between multiples of 48 and 64 samples?

Did you try to turn off the "APCI compliant control method battery" driver via Device-Manager? This one usually causes spikes every 10 seconds, but who knows how it works and interacts with FW in your system.

Are you using the "High Performance" Windows power-profile or the default "Balanced" one? Use the former!

Other than that I tend to agree with Daniel that it's likely FW/driver related. We can try to disable power-management in Windows once you did the other things. wink

12 (edited by Manuel 2013-02-26 12:19:53)

Re: CPU spikes with idle ASIO driver

Thanks Tmur, I forgot to explicitly mention that say it's a desktop I am referring to, so there's no Battery device under in the Device Manager. I am using a custom high performance power plan with every power-saving option turned off, including core parking. Changing buffer size does affect the look of the CPU usage graph consistently but only marginally: the spikes are still there and occur at the same frequency.

Changing the bandwidth has the greatest impact on the CPU usage graph: Reducing the bandwidth (e.g. selecltl "Analog") results in taller and clearner spikes, increasing the bandwidth (e.g. All channels) decreases spike height but the graph looks "noisier". The following graph corresponds to CPU usage using default BIOS settings, time between peaks is about 6 seconds:

https://dl.dropbox.com/u/98636804/Forums/RME/2013-02-26-185451%20ASIO%20CPU%20spikes.png
Again I'm going to backup my C: partition and se what happens with the fresh install. Failing that I'll get a Firewire card as Daniel suggest.

Timur: Do you get any sort of specific and consistent CPU activity on any one particular core that only happens when DIGICheck or any ASIO client is running? If using DIGICheck for this test, please ensure that audio processing is enabled.

Anyone: Does it matter if the Firewire card is PCI or PCIe?

I too agree with MC that this is an issue with the BIOS/drivers/MOBO because while messing with the BIOS settings I managed to increase the time between peaks to 15 seconds (but I didn't keep any records of what I did so I am yet to determine which settings...). Howver I never manged to fully get rid of the problem.

13 (edited by Timur Born 2013-02-26 13:11:22)

Re: CPU spikes with idle ASIO driver

Manuel wrote:

Thanks Tmur, I forgot to explicitly mention that say it's a desktop I am referring to, so there's no Battery device under in the Device Manager. I am using a custom high performance power plan with every power-saving option turned off, including core parking. Changing buffer size does affect the look of the CPU usage graph consistently but only marginally: the spikes are still there and occur at the same frequency.

Since you already know how to mess with power-plans, here is something to try out:

Turn "Processor Idle Disable" to "Disable Idle". This will run your fans hot, but makes sure that CPU power-management is really completely disabled (all cores will run at maximum frequency, no C-states, no nothing). Also make sure again that "PCI Express -> Link State Power Management" is set to OFF. Last but not least it may be worth a try to turn off Link State Power Management for HDs, too (should not, but who knows).

You may have to use a software called "Throttlestop" to specifically turn off C1E states with your own power-profile, because I don't think you can turn C1 off unless you use the "Disable Idle" option (which heats your room as well).

If you are using the special power-profile that is provided by Presonus, then turning "Disable Idle" is exactly what it does anyway. At least when I downloaded it more than a year ago and checked it (could have changed in order to keep some computers from burning the house :-P).

Changing the bandwidth has the greatest impact on the CPU usage graph: Reducing the bandwidth (e.g. selecltl "Analog") results in taller and clearner spikes, increasing the bandwidth (e.g. All channels) decreases spike height but the graph looks "noisier".

If reducing the bandwidth of Firewire has such an effect then it is another indication that Firewire may be the cause.

Timur: Do you get any sort of specific and consistent CPU activity on any one particular core that only happens when DIGICheck or any ASIO client is running? If using DIGICheck for this test, please ensure that audio processing is enabled.

I will test this once I find time. But I already tested the CPU behaviour of the various Windows Firewire drivers some time ago, and indeed, the Windows 7 non legacy driver can cause spikes on one CPU core. Actually both the W7 legacy and W8 non legacy driver do that, too, but these are considerably smaller (=lower average CPU load). In practice it doesn't matter much, though, because other CPU control mechanisms even them all out (average temp and wattage allowed, especially since I am using a laptop/MBP).

The reason why you are seeing spikes on only a single core is simple: Interrupts/DPCs can be handled by every single core separately. So whatever driver (likely FW) is causing the spikes, it will only be handled by a single core. And Windows likes to keep these things consistent if possible (stay on the same core for the same task).

Since DPC latency checker is no of help because of this, you can try LatencyMon (not sure) or Windows own Performance Monitor. With the latter you just have to add "Processor -> All instances" and then switch to the text view (not graphs). This will show you C-states (idle states), interrupts and DPCs usage for every single (logical) core.

Anyone: Does it matter if the Firewire card is PCI or PCIe?

It can matter when your PCI bus is connected to PCIe via a bridge chip instead of a direct connection to the (Southbridge) chipset. Some of these bridges cause lags, which could result in your behavior (CPU core waiting for a response that is not coming in time).

Re: CPU spikes with idle ASIO driver

Btw, the reason why I asked for "multiples of 48 samples" with your audio buffer size is that some years ago I noticed spiky behaviour of the Fireface UC at multiples of 48 samples, much more than with the FF 400 on the same computer. In practice it didn't matter, albeit it was strange to see spikes alternating with no CPU load while via FW (and multiples of 64 samples) the load was more constant.

Re: CPU spikes with idle ASIO driver

Manuel, just out of interest, if you set Task Manager to show Kernel Times, what does it look like?

16 (edited by Manuel 2013-02-27 01:59:28)

Re: CPU spikes with idle ASIO driver

funkyspacecadet wrote:

Manuel, just out of interest, if you set Task Manager to show Kernel Times, what does it look like?

It looks like this:

https://dl.dropbox.com/u/98636804/Forums/RME/2013-02-27-085209%20ASIO%20CPU%20spikes.png
The red graph, which is shown behind the green graph, more or less matches the green graph, so it's almost invisible.

Re: CPU spikes with idle ASIO driver

Since you are running Win7, have you tried switching from the standard 1394 driver (1394ohci.sys) to the legacy 1394 driver (1394bus.sys & ohci1394.sys) ?

When I tried your scenario of DIGICheck running but no music playing through a FF400, I get lower CPU utilization with the Win7 legacy 1394 driver.

I also found a Microsoft KB article talking about increased interrupt and DPC time when using isochronous mode with a IEEE-1394 (Firewire) device:

http://support.microsoft.com/kb/2450963/en-us

Not sure how relevant this article is to FF400 being used with Windows 7, though.

18 (edited by Manuel 2013-03-05 23:59:37)

Re: CPU spikes with idle ASIO driver

Jeez, I feel like an idiot...

MC wrote:

Also: does the behavior (provided it is caused by FW alone) change when using the legacy FW driver?

The very first reply by MC had the right answer. By "legacy FW driver" I thought you meant Windows PnP driver for Fireface 400/800, version 2.9992, which obviously you did not.

scan80269's last post further clarified.

https://dl.dropbox.com/u/98636804/Forums/RME/2013-03-06-065113%20ASIO%20driver%20CPU%20spikes.png

After switching to the legacy Firewire driver things began to look rather peachy. The image below shows the full-scale CPU meter for the core with the spikes:

https://dl.dropbox.com/u/98636804/Forums/RME/2013-03-06-063314%20ASIO%20CPU%20spikes.png

As you can see, the height of the spikes has been much reduced. Does this look normal? The CPU activity is up for 10 seconds, down for 5-6 seconds, repeat.

If this can be further improved by installing a PCIe Firewire card I might get one. If you guys think this is normal, I will just leave it as it is and wish you all a very pleasant day.

By the way, thanks Timur for the info on PCIe vs PCI--after checking my mobo's block diagram you were totally right that the PCIe bus is connected directly to the North Bridge whereas the PCI is connected to the South Bridge, as are the on-board Firewire ports.

Re: CPU spikes with idle ASIO driver

If everything works nice while using the legacy FW driver, just keep it that way. There are no benefits for you using the non legacy drivers, so until you update to Windows 8 (if ever) and experience new issues you are good to go for quite some time. ;-)

Re: CPU spikes with idle ASIO driver

Timur Born wrote:

If everything works nice while using the legacy FW driver, just keep it that way. There are no benefits for you using the non legacy drivers, so until you update to Windows 8 (if ever) and experience new issues you are good to go for quite some time. ;-)

I think that's good advice! So basically do you think the last CPU usage graph I posted looks about right?

Slightly off-topic, are you using W7 or W8? Does your Fireface perform any better under W8? I installed it two weeks ago to check it out and was not excited about having to re-learn everything I already know in W7 (tweaks, workarounds and new UI). Thanks!

Re: CPU spikes with idle ASIO driver

The new FW driver and the Audio Endpoint Connection service of Windows 8 is less CPU spiky, especially the latter seems to be capped at 50% CPU load on a single core whereas it could use 100% of a single core in W7. But in practice there don't seem any differences worth mentioning. After several minutes of use my laptop i7 CPU (Macbook Pro) becomes wattage and heat limited, which in turn limits the influence any of the various FW drivers have.