PDA

View Full Version : A different perspective on graphics stomping on audio thread



dasbin
10-24-2012, 12:31 PM
I've been battling, in a new system, some issues with IRQ sharing (can't move slots), specifically between the built-in graphics of an i3 and my audio cards, which all share IRQ16.

In searching high and low for answers, I came across a very interesting thread at Gearslutz: http://www.gearslutz.com/board/music-computers/440166-windows-7-irqs.html

I know a lot of you are still running XP, so this applies less to you, but I found the information intriguing and wanted to ask here about the potential accuracy of it. Specifically this:



Yet running the audio engine itself in realtime priority would indeed mask some of the other related issues if they're not attended to as well, and imo it would be best to have all bases covered: applications using modern WDDM compliant display routines (which has been necessary since Vista!) and not mixing incompatible modes (directdraw & GDI+ or Opengl for example) in addition to audio engines properly prioritized and aware of cpu core affiniity & what resources are available.) The general gist being that if you need to increase your application priority, or if sharing IRQ's with graphics is an issue, the fault doesn't lie in Windows but rather with the application potentially not following "WDDM compliant display routines." I admit to not have looked deeply into what exactly compliance is in this case, yet.

My understanding is that turning off Aero actually offloads graphics compositing onto the CPU, which, in theory, we don't really want. We want the GPU to do the work, and not have the CPU interrupt an audio thread to do graphics compositing. So theoretically, disabling Aero should actually make things worse... unless the display routine of SAC maybe isn't doing things that way Microsoft would like.

Yet, in my case, just to get a usuable Win7 system even at 2x128, I need to disable Aero, and run SAC at realtime priority... and I can't get to the lower buffer settings that I really want. I imagine being able to switch IRQ's would solve this, but that is impossible on newer systems (and I'm out of PCIe slots).

I am curious, therefore, if there is room for any potential performance improvement in the future (particularily for those using OS's newer than XP) by looking into this and changing the display routine to MS's new compliance standards.
This stuff is a bit above my head, but the impression I got is that if thread priority or IRQ sharing present any audio issues (as they do for me in SAC, in a big way), these are not the issue in themselves, but rather symptoms of some potential mismanagement within the application (which, admittedly, sounds like a common theme among audio software in general.)
Not casting any stones here, just curious as to potential future improvement. Could potentially save a lot of the headaches of future setups needing to go through an endless array of "tweaks" just to play nice with SAC. Wouldn't it be nice not to have to guide every new user through this results-not-guaranteed process for every new build.

TomyN
10-24-2012, 12:45 PM
Hi,

well one of the problems is that microsoft seems not to know which way to go. First there was GDI, afterwards there was GDI+ then direct X and now windows-presentation foundation (or something like that).

On audio it's nearly the same. Starting with windows audio and DirectSound, both not suitable for 'realtime' audio, and now with each new version (vista, win7) a 'new wonderful audio concept'. And ASIO runs (nearly) independend from windows routines, so you must trust the programmer of the driver to do things right (especial regarding DMA and (thread-)priorities.

As a programmer you do not know which one to choose, especial if you want to program a product with a long life-cycle.

Tomy

MikeDee
10-24-2012, 12:59 PM
Hi,

well one of the problems is that microsoft seems not to know which way to go.
· · · · ·
TomyWell, then...perhaps Microsoft* should have been asking their own workforce (from the top [Gates himself] down) as well as their customers when they were touting their slogan......

Where do you want to go today?

:D

*I decided to play nicely and not substitute the "s" with a "$". :cool:

TomyN
10-24-2012, 01:03 PM
:-)

An other thing I forgot to mention is that (as far as I can judge it from outside) most of graphic handling in SAC is just moving bitmaps. The current graphic cards supply massive power to do (graphic) calculatin like rendering, light, fog .... which is important when you calculate the (3D-) Graphic yourself, but this does not help SAC.

Tomy

Watty
10-24-2012, 01:16 PM
Unsinstall your graphics drivers and use the built in Windows ones. That's what I did on my bootcamped Macbook pro with XP upon discovering the Nvidia drivers were causing carnage and hundreds of slipped buffers constantly. Deleted the graphics card in device manager (as well as the ACPI battery) and instantly I was able to go down to the lowest latencies with no problems.

If your machine is a dedicated SAC machine (as it should be) you need not concern yourself with needless graphics capabilities.

gdougherty
10-24-2012, 02:20 PM
You want Aero off, because even if you offload all the fancy processing, you're still doing additional work that is unnecessary and at some point must hit the CPU and memory as a command. It's either a minimal amount of UI work for SAC or telling the graphics card to get to work on all the glitzy stuff Aero wants to do.

dasbin
10-24-2012, 04:39 PM
You want Aero off, because even if you offload all the fancy processing, you're still doing additional work that is unnecessary and at some point must hit the CPU and memory as a command. It's either a minimal amount of UI work for SAC or telling the graphics card to get to work on all the glitzy stuff Aero wants to do.

You can actually turn off all the fancy stuff and still use Aero. As long as Desktop Compositing and Use Visual Styles are turned on, evrything else can be turned off. No transparency, animations, font smoothing, window previews, shadows, etc, but still GPU composited with those two options on. Still, I'm not convinced that even doing that much should be necessary.

Anyway, I actually found another problem that people may or may not be aware of. With Windows User Account Control on at any level, SAC is prevented by UAC from ever being assigned Realtime priority. It also runs in UAC Virtualization mode by deafult for some reason, which seems to cause a performance hit of its own.

dasbin
10-24-2012, 05:09 PM
Unsinstall your graphics drivers and use the built in Windows ones. That's what I did on my bootcamped Macbook pro with XP upon discovering the Nvidia drivers were causing carnage and hundreds of slipped buffers constantly. Deleted the graphics card in device manager (as well as the ACPI battery) and instantly I was able to go down to the lowest latencies with no problems.

If your machine is a dedicated SAC machine (as it should be) you need not concern yourself with needless graphics capabilities.

Not possible here. This limits maximum resolution 1280x1024 and disables the second monitor output.

Bob L
10-24-2012, 05:19 PM
You may want to also try setting the compatibility mode to Win XP SP 2 or 3 at the desktop icon... or at the actual exe file in the folder.

Bob L