Since getting GPO and working on more complex orchestrations I have noticed that the Sonar host hits drop outs during "busy" sections. Even after trying EVERYTHING to correct this problem it still occured. I tried lot's of stuff (including but not limited to); Adjusting audio latency, setting priority for background services, memory preference for system cache, reducing polyphony, reducing midi events, changing sound card, etc. etc. etc. Whatever the experts suggested I tried but still had the drop out problem. It would always show up as CPU overloads.
Then I tried turning off hyper threading (HT). The first tests were done by switching off HT in the BIOS. Immediately I was able to play the busy sections without any drop out and now had a CPU meter reading in the mid 50's. Huh? This didn't make much sense, wasn't' HT supposed to improve performance?
Research turned up some interesting information (and there are lot's more places that mention this):
"With hyper-threading, not all CPU operations are created equal. As mentioned earlier, to optimize performance under hyper-threading you should minimize competition for shared CPU resources between the threads. The most commonly contended resource besides the CPU cache is the FPU, responsible for floating point calculations. It turns out that executing heavy floating point operations simultaneously on both logical CPUs reduces performance significantly.
If you modify the calculation in the code sample from Figure 2 to use floating point operations (shown in Figure 7), the gains from splitting the task over multiple threads will diminish, and sometimes can result in a slowdown of up to 40 percent, if the operating threads do nothing but floating point operations due to inefficient CPU resource use.
Note that the Pentium 4 has only one FPU, so there is little to gain in trying to schedule execution of floating point operations on both logical CPUs. Performance might be better if the floating point operations are kept to one thread per physical CPU."
OK, so that means that when multiple threads try to run that use floating-point (which is what AUDIO apps do lot's of) then you will see slow down problems. Now that I had a working solution I wanted Sonar to start automatically using just one processor (I had flipped HT back on in the BIOS), but still keep HT for the other programs I use, and found:
The program imagecfg.exe will allow you to set a flag in the SONARPDR.EXE (or other audio app exe) file so that every time you start it it will run on a single CPU. Make sure to backup the SONARPDR.EXE (or other audio app exe) file before patching in case you want to rollback the change. I used it as follows:
imagecfg /a 0x1 "C:\Program Files\Cakewalk\SONAR 4 Producer Edition\SONARPDR.EXE"
This solution may also work for other audio applications and problems associated with HT. Considering that the fix has little impact on the application and OS it may be worth trying. Your milage may vary.
If you try this please post your results.
System Summary: IC7-G motherboard with Intel 875 chipset and Intel Pentium 4 2.8GHz (Northwood) with 2GB RAM.
You can also try switch off HT by using the task manager and setting processor affinity. This is not the most reliable approach since an audio app may launch multiple threads at startup.