• Register
  • Help
Results 1 to 8 of 8

Topic: Performance and Hyperthreading

Share/Bookmark
  1. #1

    Performance and Hyperthreading

    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):

    http://msdn.microsoft.com/msdnmag/is...g/default.aspx

    "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.


    -- BobR


    FYI:

    System Summary: IC7-G motherboard with Intel 875 chipset and Intel Pentium 4 2.8GHz (Northwood) with 2GB RAM.

    P.S.

    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.

  2. #2

    Re: Performance and Hyperthreading

    Quote Originally Posted by br1252
    The first tests were done by switching off HT in the BIOS.
    I went into BIOS to try doing this, hoping to find a "Turn Off Hyperthreading HERE" option, but no such luck. What should I be looking for to disable, if you don't mind my asking?

  3. #3

    Re: Performance and Hyperthreading

    It ought to be something like "Hyperthreading Technology enable/disable" depending on the specific motherboard. Some mobo's only display this option when a Pentium 4 CPU with Hyperthreading Technology support is installed. If your task manager doesn't give you an option to disable hyperthreading, it's because no such CPU is installed (or hyperthreading is already disabled).

  4. #4

    Re: Performance and Hyperthreading

    What is the make and model of your motherboard? Typically it will be something simple like Hyper-Threading Enable/Disable, buried somewhere in the BIOS screens.


    I don't recommend leaving the Hyper-Threading off in the BIOS, for me it was just a simple test that worked. Having Hyper-Threading on does benefit me with other non-audio type programs.

    If you can't find it then try using IMAGECFG.EXE as described above, or by setting processor affinity using task manager.


    Setting affinity though task manager is the easiest to try but is not permanent so it would need to be done every time after launching the program (still, give it a try).

    Let us know what happens please.

    -- BobR

  5. #5

    Re: Performance and Hyperthreading

    Another solution might be to run affected applications in "Windows XXX" compatibility mode (I believe XXX should be 2000, but I can't remeber this). This is a solution, that has often been mentioned on the Finale Forum when Finale misbehaves. You set this property in the applications property dialog box once and for all. If it works, it doesn't get much easier.

  6. #6

    Re: Performance and Hyperthreading

    Quote Originally Posted by Nickie Fønshauge
    It ought to be something like "Hyperthreading Technology enable/disable" depending on the specific motherboard. Some mobo's only display this option when a Pentium 4 CPU with Hyperthreading Technology support is installed. If your task manager doesn't give you an option to disable hyperthreading, it's because no such CPU is installed (or hyperthreading is already disabled).
    Having looked at the BIOS and seeing nothing like "disable Hyperthreading" I think I ought to leave this option alone. However, it *does* say "Pentium 4 CPU with Hyperthreading Technology" in the BIOS. Also, with the Task Manager, I do have the option of displaying "One Graph Per CPU" and I get two graph windows, with independent waveforms.

    I'll need to keep looking for other solutions, for the time being.

    Thanks for replying, though. :-)

  7. #7

    Re: Performance and Hyperthreading

    Quote Originally Posted by br1252
    I don't recommend leaving the Hyper-Threading off in the BIOS, for me it was just a simple test that worked. Having Hyper-Threading on does benefit me with other non-audio type programs.
    Gotcha.

    I did try your suggestion of setting CPU Affinity, and the results seem just as they were before.

    I'm currently using an Audigy ZS soundcard, and so downloaded a copy of the kX Project ASIO driver and have been trying that out. Can't tell if it's an improvement. I have yet to try the ASIO4ALL driver which was also recommended, and I still haven't tried the imagecfg file, yet, and may leave that till after the holiday weekend rather than leave a fix project "mid stream."

    Thanks for replying. I'll keep you posted.

  8. #8

    Re: Performance and Hyperthreading

    If you are using Sonar try: Options / Audio /Advanced / and make sure "Use Multiprocessing Engine" is UNchecked

    -- Bob

Go Back to forum

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •