White Paper: Page (1) of 2 - 03/08/04
Email this story to a friend. email article Print this page (Article printing at MyDmn.com). print page facebook

Multiprocessing in SONAR 3.1

A White Paper about how performance benefits are realized

By Ron Kuper

Editor's Note -- Demands on Digital Audio Workstation performance have skyrocketed lately, with plug-ins, soft synths, and mixing functions being run simultaneously across multiple tracks. The latest chips from Intel and AMD are powerful on their own, but for the ultimate performance, a multiple processor configuration is the way to go, with multithreaded software. In this White Paper, Cakewalk's VP/Engineering Ron Kuper explains how the company's flagship audio production program SONAR has been redesigned with the release of version 3.1 to take full advantage of multiple CPUs. The result is significant performance gains, as detailed in the chart at the end. And, as he explains, the benefits even extend to single-processor computers.

Ron Kuper
Key Points
Cakewalk audio software has been multithreaded since 1995. The benefit to users has been smoother performance on a single-CPU system. A multi-threaded design also means faster performance on a multiple-CPU system, because threads can run simultaneously on different CPUs.

SONAR 3.1 has been redesigned to maximize multithreading benefits. Work is allocated more evenly among different threads and among multiple CPUs. This provides users for SONAR 3.1 with even smoother and faster performance.



Multiprocessing is moving into the mainstream. Intels Hyper-Threading Technology (HT Technology) lets a single-CPU system act more like a multi-CPU system. As a result, the performance benefits of multi-threading will continue to become available to many more customers, not just the lucky few with expensive multi-CPU systems.

Image #1: SONAR 3.11 with multiprocessing disabled (click for larger view). See "About the Screen Shots," below.
Introduction
Cakewalks music workstation products have utilized multithreading since Cakewalk Pro Audio 4.0. This design allows the system to balance its workload smoothly between the graphical user interface, audio mixing/DSP, MIDI and disk streaming. Multiprocessor systems would generally see smoother and more responsive performance thanks to this multithreaded architecture.

Within the last couple of years there has been a dramatic shift in how people are using music workstations. Low latency audio drivers are commonplace, with most customers routinely recording and mixing at less than 5 milliseconds of latency. This lower latency has in turn opened the door to the increased usage of software synthesizers and live audio effects. In other words, lower audio latency has driven demand for more real time audio DSP.

At the same time multiprocessing systems have become mainstream. At one time only the most die-hard power user would use a workstation with multiple CPUs. But today (thanks in part to Intels Hyper-Threading Technology) most new desktop PCs incorporate some kind of multiprocessing. Both Intels and AMDs strategic roadmaps indicate that multiprocessing is here to stay.

About the Screen Shots
The images above and below illustrate SONAR 3.1.1 carrying a heavy processing load, and how it manages that load in single- (image #1) and dual-processor (image #2) configurations.

The screen shots were captured by Ron Kuper after he loaded a real-world test project consisting of about 30 tracks, several plugins and soft synths. This project was played on a stock Dell 4600C computer, running a 3GHz P4 with Hyperthreading and 512 MB RAM. He used the SoundMax audio drivers in WDM mode, playing at 10 msec latency.

The UniProc image [#1] is a screen shot taken with SONAR running with multiprocessing disabled. The MultiProc image [#2] shows SONAR with multiprocessing enabled.

"I call your attention to two values in these screen shots," says Kuper. "First is the 'CPU Usage History' in the Windows Task Manager. Second is the CPU load shown in SONAR's status bar, at the bottom of the SONAR window.

"In the UniProc image, the CPU history shows CPU #1 being fairly active while CPU #2 is relatively idle. In the MultiProc image, both CPUs are utilized more or less equally.

"The UniProc image shows higher CPU usage (61%) in SONAR than the MultiProc image (46%). Please note that these values are just the readings the instant I took the screen shot. The actual multiprocessing gains aren't quite that high on average. The benchmark numbers [bottom of page 2] in the White Paper are more indicative."

SONAR 3.1 has evolved to address the needs of the modern multiprocessing music workstation, where literally dozens of effects and software synthesizers need to be online and responsive. In SONAR 3.1 mixing and DSP are now subdivided across individual processors in a multiprocessor system. Rather than one CPU carrying the workload for all DSP, multiple CPUs can share the load.

Multithreading Concepts
In simple terms, a computer program is a series of instructions that are executed sequentially by a central processing unit (CPU).

A program that employs threads, or is multithreaded, takes this idea and replicates it. Rather than having one sequence of instructions for all tasks that need to be done by the application a multithreaded program uses many sequences of instructions, one per thread. Its just like having many different little sub-programs, all running simultaneously, all running in parallel.

Obviously on a uniprocessor computer these threads dont really run simultaneously. The computers CPU brain can only perform one instruction at a time. But the operating system is able to provide the illusion that multiple threads are executing in parallel. It does this through a procedure known as scheduling.

The Windows scheduler allows multiple threads to run in orderly fashion, one at a time, by carefully selecting which one should run next and then limiting how much time it gets before moving on to the next one. This scheduling mechanism is very rich and complex, allowing applications to set thread priorities, to make sure that threads which involve user interactions remain responsive, and to allow threads to relinquish their ?time slice if they have nothing left to do.

Multithreading with Multiple CPUs: Multiprocessing
Multithreading on Windows starts to get interesting on multiprocessor systems. The Windows scheduler detects the presence of multiple CPUs, and will allow more than one thread to run truly in parallel by assigning one thread to one CPU and another thread to the other. Note that a Windows application must have a multithreaded architecture in order to benefit from multiple CPUs.

Image #2: SONAR 3.11 with multiprocessing enabled. (Click for larger view)
Even on a multiprocessor system the weakest link in an application will be the thread that carries the highest CPU burden. For example, prior to version 3.1, SONAR performed all audio mixing and DSP on the same single thread. This meant that one could create a project with a single solitary audio track, and then load this track with audio effects to the point where the project wont play not on a single processor system, or a quad processor system! This is because one CPU would have needed to do all the mixing and DSP, ironically while other CPUs would be sitting idle.

In other words, the division of labor between threads must be carefully chosen in order to get the maximum benefit from multiple CPUs. Ideally the most CPU-intensive sections of code would be multithreaded. In the case of SONAR, it meant that the code which does mixing, runs plug-ins and synthesizers, needed to be designed a way to be run on multiple threads.

Page: 1 2 Next Page
Related Keywords:Multiprocessing, SONAR 3.1, Multiprocessor, Ron Kuper, SONAR, multithreaded, VP/Engineering, Cakewalk, audio mixing, DSP, MIDI
Related Sites: BN - Broadcast Newsroom ,   BN - HD ,   BN - Webcast ,   BN - Production ,   BN - Hardware

Related Newsletters:
Source:Digital Media Online. All Rights Reserved

DMO TEXT LINKS
(Click here to place a textlink on this site)

Vegas Pro 10 Available Now
Professional HD Video, audio, and Blu-Ray creation.
CLICK HERE!!!

Draw it. Build it. Make it.
Reset Your Skill Set.
Pratt Institute, CLICK HERE!!

Adobe eLearning Suite 2.5
Give your eLearning a makeover using best-in-class tools to author and enrich content.
Click Here To Learn More

Bankers group pitches cellphones as digital wallets
Canada's biggest banks have a blueprint for turning cellphones into mobile payment terminals, a key step in a process that could revolutionize the way Canadians pay for purchases at retailers Read More
Bankers group pitches cellphones as digital wallets
Independent technology analyst Carmi Levy talks about future moves to use smartphones as mobile payment devices Read More
Are You a Side-scroller?
The side-scroller category comes with many cliches. Here`s how to get past the stereotypes and succeed with side-scrollers. Read More
Analyst Moves: AAPL, JOY
Apple (AAPL) today had its estimates reduced through 2013 by Credit Suisse (CS) as the firm expects US smartphone growth to slow down. A $750 price target was issued with an outperform rating. Read More

@ Copyright, 2010 Digital Media Online, All Rights Reserved

Webmaster
Digital Media Online, Inc.