Jump to content
Sign in to follow this  
Jay Parlar

Make Garageband use both processors

Recommended Posts

Anyone know why Garageband only ever uses one of the processors in the Intel machines?

 

My musician friend just got a Mac Mini to play around with Garageband, and after adding a ton of tracks and effects, he gets the dreaded error message from Garageband saying too much was going on.

 

So we try the song again, but this time I run ActivityMonitor at the same time. What a surprise I got when I saw that only one of the processors was being pegged for Garageband, despite 18 threads running.

 

Am I missing something here? I've never programmed against Cocoa before, but I would assume that if you had multiple threads, the OS would spread them out over the multiple processors. It seems that Garageband is putting ALL of the audio processing into just one thread. Either that, or I have no understanding of how threads run on OS X (which is just as likely).

 

Jay P.

Share this post


Link to post
Share on other sites

I really have no idea about garageband using only one processor versus both at the same time. However, I believe that error message you mentioned actually has to do with how much ram you are using. I tend to go nuts with tracks and even with 2gb of ram I'll get that error when I get to around 15 tracks of real instruments (although it will still play the song after a few "hiccups.")

Edited by firewalk13

Share this post


Link to post
Share on other sites
I really have no idea about garageband using only one processor versus both at the same time. However, I believe that error message you mentioned actually has to do with how much ram you are using. I tend to go nuts with tracks and even with 2gb of ram I'll get that error when I get to around 15 tracks of real instruments (although it will still play the song after a few "hiccups.")

 

I checked the RAM usage as well, he had tons free (at least 400 megs). The one processor core was completely pegged though, which is why I'd love for it to use both.

Share this post


Link to post
Share on other sites

Well, I read somewhere that for Windows "100% of all of the dual core systems ... was NOT properly modified to fully support the dual cores within." Maybe something similar applies to Mac OS X.

 

In the same article a fix for Bootcamp users is suggested. I'm curious if this means that Windows under Bootcamp can outperform Windows under Parallels more than it does now. Unfortunately, I cannot test this, because I don't own a multi-core model.

 

According to this PDF document from Intel:

CPUID reports information that is used by OS and applications to detect hardware features. It also provides multi-threading/multi-core configuration information. For example, MP-aware OSs rely on data reported by CPUID to discover the topology of logical processors in a platform (see Section 7.10, “Programming Considerations for Hardware Multi-Threading Capable Processors,” in the Intel® 64 and IA-32 Architectures Software Developer’s Manual, Volume 3A).

 

If a VMM is to support asymmetric allocation of logical processor resources to guest OSs that are MP aware, then the VMM must emulate CPUID for its guests. The emulation of CPUID by the VMM must ensure the guest’s view of CPUID leaves are consistent with the logical processor allocation committed by the VMM to each guest OS.

I interpret this technical text as follows:
The virtual memory mapper (VMM) should decide which thread gets which core. It should, therefore, read the central processing unit's identifier (CPUID), acknowledge that there are multiple cores, and manage the use of the available cores seamlessly.

In Windows XP SP2, you will need an extra driver to do this. Perhaps something similar applies to Mac OS X. I'm just guessing here, because I was not able to find an article on apple.com, using the search term vmm multi-core.

 

One would expect applications to be agnostic to multiple cores, and that the operating system handles this in stead. That is, if the application threads can be divided among the cores, because that is a prerequisite.

Edited by Ignoracious

Share this post


Link to post
Share on other sites
One would expect applications to be agnostic to multiple cores, and that the operating system handles this in stead. That is, if the application threads can be divided among the cores, because that is a prerequisite.

 

That's exactly what I thought too. However, I'm beginning to believe that's not the case. If you look at Activity Monitor, pretty much every app is running with multiple threads, I believe that Cocoa pretty much demands it. However, it doesn't really look like *any* app I run ever spawns across both processors.

 

Maybe Apple forced Garageband to stay on one processor, to give people reason to upgrade to Logic?

Share this post


Link to post
Share on other sites
That's exactly what I thought too. However, I'm beginning to believe that's not the case. If you look at Activity Monitor, pretty much every app is running with multiple threads, I believe that Cocoa pretty much demands it. However, it doesn't really look like *any* app I run ever spawns across both processors.

 

Maybe Apple forced Garageband to stay on one processor, to give people reason to upgrade to Logic?

 

 

Apple wouldn't do that, it does surprise me that GB isn't multi threaded very well.

 

EDIT: I just didn't some experimenting, and on my MacBook it looks like it balances the load pretty well.

 

maybe some plugins you're using aren't multi threaded very well.

Edited by Goatman

Share this post


Link to post
Share on other sites

The best guess i can come up with is that the current Garageband we have and love has not yet been optomized to take advantage of mutli core chips. Its possible that Apple wrote the code for the vast majority of single core owners as the time of the release of GB 3, most people had single core chips and intel cpu's just came out. I'm thinking its just old code in Garageband, heck it has not had a real good update in a while. I'll bet though, that when ever Steve finally decides to release iLife' 07 ( or whatever they end up calling it) that Garageband will be optomized for multicore chips as many more macs users will have these platforms untill the day we all do.

Cheers

Share this post


Link to post
Share on other sites
when ever Steve finally decides to release iLife' 07 ( or whatever they end up calling it) that Garageband will be optomized for multicore chips as many more macs users will have these platforms untill the day we all do.

We can only hope that Garageband (and the other iLife apps) will be optimized for multiple cores. I wouldn't hold my breathe, though.

Share this post


Link to post
Share on other sites
Close widgets to free up more RAM, try again.

Did you try locking the tracks after they were created its supposed to cut down on the amount of procceser power needed

Edited by neil_jo

Share this post


Link to post
Share on other sites
Close widgets to free up more RAM, try again.

 

Like I said earlier, there were over 400 megs free, it's a processor thing.

 

Did you try locking the tracks after they were created its supposed to cut down on the amount of procceser power needed

 

I'll give that a try. Of course, even if I free up more of the processor, it'll still bug me that his Garageband is still ignoring the other one :)

Share this post


Link to post
Share on other sites

Ok, here are my latest results:

 

Doing a Command-Y to hide the meters chops a few points off the CPU requirements.

 

Locking tracks makes a HUGE difference. I created a song with about 20 tracks, and it would only play about two seconds of it before giving up. If I lock all the tracks, CPU usage drops to almost nothing (Activity Monitor shows Garageband at 30%).

 

Here's the really interesting thing: When I do it without locking the tracks, and Garageband stops playing it, it *is* in fact spreading the load over both processors (according to the "CPU Usage" graph), but it refuses to use more than about 50% of each processor. As soon as the process gets to about 80% CPU, it cuts out. So *maybe* there's something in Garageband that makes the song stop if the song hits a certain percentage. Of course, when it cuts out, there's still a ton of CPU available (because a process at 80% CPU means using each CPU at 40% each).

 

So, yeah, that's about it. Locking the track works great, and I was technically wrong about it not spreading the load. It does spread the load, but refuses to put too much load on it.

Share this post


Link to post
Share on other sites
When I do it without locking the tracks, and Garageband stops playing it, it *is* in fact spreading the load over both processors (according to the "CPU Usage" graph), but it refuses to use more than about 50% of each processor.

This means the problem is solved. The problem was "Make Garageband use both processors". Well, according to you, it does.

 

About the CPU not going beyond 80%, this could be a hardware issue. If you have a slow hard disk (5400 rpm), you can throw whatever CPU processing power you like, it still needs to access the hard disk, and that slows things down. If you install MenuMeters and use the disk-MenuMeter, you will probably see the occasional disk access while running Garageband in your system (it did in my 1.25 G4 with 1 GB memory).

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

  • Recently Browsing

    No registered users viewing this page.

  • Who's Online (See full list)

    There are no registered users currently online

×