Optimizing: Use all 8 cores

Hi, I have an early 2008 Mac Pro with 2 quad core 2.8GHz. When ever I run simulations(around 10,000) in Excel 2004 or when I'm running a program in Matlab it takes a long time, (longer than an old Dell with a Pentium 3 1.8GHz). When I open up the activity monitor it shows that it is only using 12% of the CPU and the other 88% is just sitting idle. I was wondering if there is a way to tell the computer to use all of the CPU for a specific task or if it needs to be done in the program.
Thanks in advance for your help.(I'm not sure if this is in the correct place in the forum. Sorry if it is.)

Mac Pro, Mac OS X (10.5.2), 8 core 2.8Gh

Posted on May 7, 2008 11:18 PM

Reply
5 replies

May 8, 2008 4:04 AM in response to convert411

Hi and welcome to Discussions,

first, Excel 2004 isn't the best application to measure the power of your Mac Pro.
Mainly, because it was written for Macs that have PowerPC processors and therefor has to use the 'Rosetta' translation layer Apple provides for such 'older' programs.

Same might go for Matlab (I don't use it), since it is a Java application and also needs X11.

The usage of the Cores is handled by OSX in conjunction with the application itself.
OSX can not assign additional Cores if the app can't handle them.
In that case additional Cores can only be used to run additional apps.

Stefan

May 9, 2008 2:12 PM in response to convert411

From what I think I've read at other web sites, Mac OS X and other modern OSs do not need any special instructions to use all cores. The way it apparently works is that either your program knows about multiple cores, or it doesn't. In other words, if it can recognize and use two cores, it can also recognize 4 cores, or 8, or 128. It's either "one" or "many." That said, some apps can be optimized better for more cores, and sometimes the bottleneck is not with the CPU. Although it sounds like your uses should not be held back by anything but the CPU. I will concur that Office 2004 is not natively written for Intel processors and as such is not a good test. Matlab, though, if it is Intel-optimized, should be running full tilt. But I'm not a Matlab user.

May 9, 2008 2:43 PM in response to Network 23

Intel brings thread optimisation tool to OpenSolaris
By James Niccolai, IDG News Service

Developers who use C++ and Sun's OpenSolaris OS are to be offered a new tool. Intel said that Threading Building Blocks was aimed at reducing the amount of coding that C++ developers have to do to take advantage of the extra computing power in multicore chips.

C++ isn't designed in a way that takes advantage of multiple cores naturally, so application performance won't scale proportionally as additional cores are added. Threading Building Blocks aims to address that.

It is already offered for Windows, Linux, the Mac OS and FreeBSD and it's now available for OpenSolaris, said Doug Fisher, general manager of Intel's Systems Software Division

http://www.techworld.com/applications/news/index.cfm?newsID=101454
------------------
Intel released new compilers last fall with the advent of the Penryn to help generate better optimizations for multi-core chips for use on OS X and other platforms.

Still early on in the multi-core systems, though I think Apple has been on top of the ball, applications do need to be recomiled or even moved to new code base.

CS4 is suppose to come out in 64-bit version for Vista while the OS X version will take longer and wait for CS5.

And the OS can do some of the work at times to help scheduling. But there are times when moving code and data between cores can be ineffecient and lead to "core" or "thread" thrashing which is why you see much larger L3 caches in some systems to take up the latency penalty.

Taming the front side bus, moving to direct connect, embedded memory controller, and also, "Penryn" is two dual-core cpus in a package, while the next generation will be a true native quad-core, the Penryn chip is still more efficient clock for clock over its predecessor Xeon used in 2007 Mac Pro.

May 10, 2008 8:19 AM in response to The hatter

*Coverity reveals multithreaded development tool*

It can automatically detect concurrency defects that can cause data corruption and application failures. The tool observes code as it is executed and automatically identifies race conditions and deadlocks.
This distinction is particularly important for multi-threaded applications that, due to their complexity, may run without failure for extremely long periods of time before a "perfect storm" of system events triggers a concurrency defect.


+Coverity Thread Analyzer is a standalone product that runs on Linux, Solaris Sparc, Solaris X86, Windows XP and Server 2003, and Mac OS X.+
Techworld: Coverity

Jun 16, 2008 1:10 AM in response to convert411

Matlab is NOT a Java application per se, only the GUI part is.
Which version of Matlab are you using? Under the Preference, there is a setting to choose whether you want to take advantage of multithreading or not. It's default to Off, so set it to Auto (8 cores for you).

Whether it will speed up your analysis is another matter. Matlab under OSX is known to be much slower than Windows. Google to find some speed difference report.

I use my macbook for most things but for large jobs I use 8cores running Windows xp 64bit.
It's suitably fast for matlab.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

Optimizing: Use all 8 cores

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.