[PD] Pd performance os OS X
brouse at music.mcgill.ca
Fri Nov 23 19:22:56 CET 2007
On Thu, 22 Nov 2007, pd-list-request at iem.at wrote:
> I use JACK almost always on OSX with PD (when I use it on OSX at all),
> and still the speed is quite poor. I'm fairly positive it has to do with
> whether Aqua handles the graphical interface or not. All those brushed
> chrome windows and colorful spinning widgets sure are expensive!
This is statement is factually incorrect as noted elsewhere.
Some points to consider:
1. Aqua is the name of the visual theme of OS X 10.0 circa 2001.
2. Quartz (Quartz Extreme if you must) is the window rendering engine on
OS X and it runs almost entirely on the GPU. The WindowServer process does
manage some other chores and runs on the CPU uses only about 1% CPU.
3. Core Audio is extremely efficient and a well-written Core Audio app
will take very little CPU especially when idle.
4. Well-written CLI apps run as fast or faster on OS X as on other Un*ces.
5. Extremely sophisticated audio and video applications do run quite well
with reasonably low CPU usage on OS X.
Maybe my previous top data was too subtle. A quick check reveals that for
some reason, just turning audio rendering on soaks up about 20% of the CPU
and seems to involve a fair bit of thrashing about in the kernel and
memory. I don't know enough about the internals of Pd to add any more
insightful comments, but here are some raw figures comparing Pd and iTunes
CPU and system usage:
idle audio off: 1.6% CPU, 1000 SysCalls/sec (Mach + BSD)
idle audio on: 21% CPU, 4400 SysCalls/sec (Mach + BSD)
#22 patch open: 29% CPU, 4700 SysCalls/sec (Mach + BSD)
#22 patch w GemWin: 34% CPU, 5300 SysCalls/sec (Mach + BSD)
#22 patch running: 46% CPU, 5300 SysCalls/sec (Mach + BSD)
idle not playing: 0.0% CPU, 5-20 SysCalls/sec (Mach + BSD)
playing: 9.3% CPU, 900 SysCalls/sec (Mach + BSD)
This could have to do with PortAudio as the glue to CoreAudio, I don't
Thomas Grill was quite right. What is needed is for those with the time
and motivation to use the performance profiling tools (such as Shark,
Sampler, BigTop etc.) which come with Apple's free developer tools and dig
into Pd to discover what is chewing up CPU cycles. Here are some guides:
More information about the Pd-list